diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-04-18 13:58:15 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:01 -0400 |
commit | 9393bd07cf218ca51d0e627653f906a9d76a9131 (patch) | |
tree | 402205fe6336028df48cd65b31da0482f0b0bb41 /fs/autofs4/expire.c | |
parent | 589ff870ed60a9ebdd5ec99ec3f5afe1282fe151 (diff) |
switch follow_down()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/autofs4/expire.c')
-rw-r--r-- | fs/autofs4/expire.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c index 3077d8f16523..aa39ae83f019 100644 --- a/fs/autofs4/expire.c +++ b/fs/autofs4/expire.c | |||
@@ -48,19 +48,19 @@ static inline int autofs4_can_expire(struct dentry *dentry, | |||
48 | static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) | 48 | static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) |
49 | { | 49 | { |
50 | struct dentry *top = dentry; | 50 | struct dentry *top = dentry; |
51 | struct path path = {.mnt = mnt, .dentry = dentry}; | ||
51 | int status = 1; | 52 | int status = 1; |
52 | 53 | ||
53 | DPRINTK("dentry %p %.*s", | 54 | DPRINTK("dentry %p %.*s", |
54 | dentry, (int)dentry->d_name.len, dentry->d_name.name); | 55 | dentry, (int)dentry->d_name.len, dentry->d_name.name); |
55 | 56 | ||
56 | mntget(mnt); | 57 | path_get(&path); |
57 | dget(dentry); | ||
58 | 58 | ||
59 | if (!follow_down(&mnt, &dentry)) | 59 | if (!follow_down(&path)) |
60 | goto done; | 60 | goto done; |
61 | 61 | ||
62 | if (is_autofs4_dentry(dentry)) { | 62 | if (is_autofs4_dentry(path.dentry)) { |
63 | struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); | 63 | struct autofs_sb_info *sbi = autofs4_sbi(path.dentry->d_sb); |
64 | 64 | ||
65 | /* This is an autofs submount, we can't expire it */ | 65 | /* This is an autofs submount, we can't expire it */ |
66 | if (autofs_type_indirect(sbi->type)) | 66 | if (autofs_type_indirect(sbi->type)) |
@@ -70,7 +70,7 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) | |||
70 | * Otherwise it's an offset mount and we need to check | 70 | * Otherwise it's an offset mount and we need to check |
71 | * if we can umount its mount, if there is one. | 71 | * if we can umount its mount, if there is one. |
72 | */ | 72 | */ |
73 | if (!d_mountpoint(dentry)) { | 73 | if (!d_mountpoint(path.dentry)) { |
74 | status = 0; | 74 | status = 0; |
75 | goto done; | 75 | goto done; |
76 | } | 76 | } |
@@ -86,8 +86,7 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) | |||
86 | status = 0; | 86 | status = 0; |
87 | done: | 87 | done: |
88 | DPRINTK("returning = %d", status); | 88 | DPRINTK("returning = %d", status); |
89 | dput(dentry); | 89 | path_put(&path); |
90 | mntput(mnt); | ||
91 | return status; | 90 | return status; |
92 | } | 91 | } |
93 | 92 | ||