diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-07-23 10:07:10 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-07-23 10:07:10 +1000 |
commit | ca3c4d173f3d18655f2805976d59b3fe34cf2901 (patch) | |
tree | 15fefa53339069154c0a3d6e2baf64933f7ad23d | |
parent | edafe99def14a31bbbd5196f166c4fa465616c4a (diff) |
misc:down_nowait-documentation
down_trylock -> down_try in documentation and comments.
Fix up kernel-locking.tmpl and random bitching about down_trylock.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | fs/ocfs2/inode.c | 4 | ||||
-rw-r--r-- | include/linux/mutex.h | 4 | ||||
-rw-r--r-- | kernel/mutex.c | 4 |
3 files changed, 2 insertions, 10 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 7e9e4c79aec7..64211fc74266 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -1062,10 +1062,6 @@ void ocfs2_clear_inode(struct inode *inode) (unsigned long long)oi->ip_blkno); mutex_unlock(&oi->ip_io_mutex); - /* - * down_trylock() returns 0, down_write_trylock() returns 1 - * kernel 1, world 0 - */ mlog_bug_on_msg(!down_write_trylock(&oi->ip_alloc_sem), "Clear inode of %llu, alloc_sem is locked\n", (unsigned long long)oi->ip_blkno); diff --git a/include/linux/mutex.h b/include/linux/mutex.h index bc6da10ceee0..c1f5b3f9fe2d 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -141,10 +141,6 @@ extern int __must_check mutex_lock_killable(struct mutex *lock); # define mutex_lock_killable_nested(lock, subclass) mutex_lock_killable(lock) #endif -/* - * NOTE: mutex_trylock() follows the spin_trylock() convention, - * not the down_trylock() convention! - */ extern int mutex_trylock(struct mutex *lock); extern void mutex_unlock(struct mutex *lock); diff --git a/kernel/mutex.c b/kernel/mutex.c index bcdc9ac8ef60..7502055dc6d0 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c @@ -370,8 +370,8 @@ static inline int __mutex_trylock_slowpath(atomic_t *lock_count) * Try to acquire the mutex atomically. Returns 1 if the mutex * has been acquired successfully, and 0 on contention. * - * NOTE: this function follows the spin_trylock() convention, so - * it is negated to the down_trylock() return values! Be careful + * NOTE: this function follows the spin_trylock()/down_try() convention, + * so it is negated to the old down_trylock() return values! Be careful * about this when converting semaphore users to mutexes. * * This function must not be used in interrupt context. The |