diff options
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/mntpt.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index d23b2e344a78..aa59184151d0 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c | |||
@@ -241,7 +241,6 @@ error_no_devname: | |||
241 | struct vfsmount *afs_d_automount(struct path *path) | 241 | struct vfsmount *afs_d_automount(struct path *path) |
242 | { | 242 | { |
243 | struct vfsmount *newmnt; | 243 | struct vfsmount *newmnt; |
244 | int err; | ||
245 | 244 | ||
246 | _enter("{%s,%s}", path->mnt->mnt_devname, path->dentry->d_name.name); | 245 | _enter("{%s,%s}", path->mnt->mnt_devname, path->dentry->d_name.name); |
247 | 246 | ||
@@ -249,24 +248,12 @@ struct vfsmount *afs_d_automount(struct path *path) | |||
249 | if (IS_ERR(newmnt)) | 248 | if (IS_ERR(newmnt)) |
250 | return newmnt; | 249 | return newmnt; |
251 | 250 | ||
252 | mntget(newmnt); | 251 | mntget(newmnt); /* prevent immediate expiration */ |
253 | err = do_add_mount(newmnt, path, MNT_SHRINKABLE, &afs_vfsmounts); | 252 | mnt_set_expiry(newmnt, &afs_vfsmounts); |
254 | switch (err) { | 253 | queue_delayed_work(afs_wq, &afs_mntpt_expiry_timer, |
255 | case 0: | 254 | afs_mntpt_expiry_timeout * HZ); |
256 | queue_delayed_work(afs_wq, &afs_mntpt_expiry_timer, | 255 | _leave(" = %p {%s}", newmnt, newmnt->mnt_devname); |
257 | afs_mntpt_expiry_timeout * HZ); | 256 | return newmnt; |
258 | _leave(" = %p {%s}", newmnt, newmnt->mnt_devname); | ||
259 | return newmnt; | ||
260 | case -EBUSY: | ||
261 | /* someone else made a mount here whilst we were busy */ | ||
262 | mntput(newmnt); | ||
263 | _leave(" = NULL [EBUSY]"); | ||
264 | return NULL; | ||
265 | default: | ||
266 | mntput(newmnt); | ||
267 | _leave(" = %d", err); | ||
268 | return ERR_PTR(err); | ||
269 | } | ||
270 | } | 257 | } |
271 | 258 | ||
272 | /* | 259 | /* |