diff options
author | Ian Kent <raven@themaw.net> | 2006-03-27 01:14:51 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 08:44:40 -0800 |
commit | e3474a8eb38e48dea6690d1fabd75f3c7fd2f93f (patch) | |
tree | 0eb85dea5d7ae7bab9e22b139f5757c67294402e | |
parent | 90a59c7cf5dd68b41ffab61dd30eba1ef5746e66 (diff) | |
download | blackbird-op-linux-e3474a8eb38e48dea6690d1fabd75f3c7fd2f93f.tar.gz blackbird-op-linux-e3474a8eb38e48dea6690d1fabd75f3c7fd2f93f.zip |
[PATCH] autofs4: change may_umount* functions to boolean
Change the functions may_umount and may_umount_tree to boolean functions to
aid code readability.
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/autofs/dirhash.c | 2 | ||||
-rw-r--r-- | fs/autofs4/expire.c | 2 | ||||
-rw-r--r-- | fs/autofs4/root.c | 2 | ||||
-rw-r--r-- | fs/namespace.c | 8 |
4 files changed, 7 insertions, 7 deletions
diff --git a/fs/autofs/dirhash.c b/fs/autofs/dirhash.c index 5ccfcf26310d..3fded389d06b 100644 --- a/fs/autofs/dirhash.c +++ b/fs/autofs/dirhash.c @@ -92,7 +92,7 @@ struct autofs_dir_ent *autofs_expire(struct super_block *sb, ; dput(dentry); - if ( may_umount(mnt) == 0 ) { + if ( may_umount(mnt) ) { mntput(mnt); DPRINTK(("autofs: signaling expire on %s\n", ent->name)); return ent; /* Expirable! */ diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c index 6ae2fc8233ff..02a218fbde5f 100644 --- a/fs/autofs4/expire.c +++ b/fs/autofs4/expire.c @@ -64,7 +64,7 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) goto done; /* Update the expiry counter if fs is busy */ - if (may_umount_tree(mnt)) { + if (!may_umount_tree(mnt)) { struct autofs_info *ino = autofs4_dentry_ino(top); ino->last_used = jiffies; goto done; diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index dcd4802a5d5f..26eb1f024866 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -699,7 +699,7 @@ static inline int autofs4_ask_umount(struct vfsmount *mnt, int __user *p) { int status = 0; - if (may_umount(mnt) == 0) + if (may_umount(mnt)) status = 1; DPRINTK("returning %d", status); diff --git a/fs/namespace.c b/fs/namespace.c index e069a4c5e389..bf478addb852 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -459,9 +459,9 @@ int may_umount_tree(struct vfsmount *mnt) spin_unlock(&vfsmount_lock); if (actual_refs > minimum_refs) - return -EBUSY; + return 0; - return 0; + return 1; } EXPORT_SYMBOL(may_umount_tree); @@ -481,10 +481,10 @@ EXPORT_SYMBOL(may_umount_tree); */ int may_umount(struct vfsmount *mnt) { - int ret = 0; + int ret = 1; spin_lock(&vfsmount_lock); if (propagate_mount_busy(mnt, 2)) - ret = -EBUSY; + ret = 0; spin_unlock(&vfsmount_lock); return ret; } |