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>
- if ( may_umount(mnt) == 0 ) {
+ if ( may_umount(mnt) ) {
mntput(mnt);
DPRINTK(("autofs: signaling expire on %s\n", ent->name));
return ent; /* Expirable! */
mntput(mnt);
DPRINTK(("autofs: signaling expire on %s\n", ent->name));
return ent; /* Expirable! */
goto done;
/* Update the expiry counter if fs is busy */
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;
struct autofs_info *ino = autofs4_dentry_ino(top);
ino->last_used = jiffies;
goto done;
- if (may_umount(mnt) == 0)
status = 1;
DPRINTK("returning %d", status);
status = 1;
DPRINTK("returning %d", status);
spin_unlock(&vfsmount_lock);
if (actual_refs > minimum_refs)
spin_unlock(&vfsmount_lock);
if (actual_refs > minimum_refs)
}
EXPORT_SYMBOL(may_umount_tree);
}
EXPORT_SYMBOL(may_umount_tree);
*/
int may_umount(struct vfsmount *mnt)
{
*/
int may_umount(struct vfsmount *mnt)
{
spin_lock(&vfsmount_lock);
if (propagate_mount_busy(mnt, 2))
spin_lock(&vfsmount_lock);
if (propagate_mount_busy(mnt, 2))
spin_unlock(&vfsmount_lock);
return ret;
}
spin_unlock(&vfsmount_lock);
return ret;
}