Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118427
b: refs/heads/master
c: bc9c406
h: refs/heads/master
i:
  118425: 40f88a2
  118423: 1e61878
v: v3
  • Loading branch information
Ian Kent authored and Linus Torvalds committed Nov 6, 2008
1 parent 150baba commit be8e7cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eefc488f96cdde6e152b45675b50bf380b95d99f
refs/heads/master: bc9c4068388eea01d3b5da31016879f2341ecec5
19 changes: 15 additions & 4 deletions trunk/fs/autofs4/expire.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,23 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry)
mntget(mnt);
dget(dentry);

if (!autofs4_follow_mount(&mnt, &dentry))
if (!follow_down(&mnt, &dentry))
goto done;

/* This is an autofs submount, we can't expire it */
if (is_autofs4_dentry(dentry))
goto done;
if (is_autofs4_dentry(dentry)) {
struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);

/* This is an autofs submount, we can't expire it */
if (sbi->type == AUTOFS_TYPE_INDIRECT)
goto done;

/*
* Otherwise it's an offset mount and we need to check
* if we can umount its mount, if there is one.
*/
if (!d_mountpoint(dentry))
goto done;
}

/* Update the expiry counter if fs is busy */
if (!may_umount_tree(mnt)) {
Expand Down

0 comments on commit be8e7cd

Please sign in to comment.