follow_automount(): get rid of dead^Wstillborn code
1) no instances of ->d_automount() have ever made use of the "return ERR_PTR(-EISDIR) if you don't feel like mounting anything" - that's a rudiment of plans that got superseded before the thing went into the tree. Despite the comment in follow_automount(), autofs has never done that. 2) if there's no ->d_automount() in dentry_operations, filesystems should not set DCACHE_NEED_AUTOMOUNT in the first place. None have ever done so... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -2824,9 +2824,16 @@ static int do_new_mount(struct path *path, const char *fstype, int sb_flags,
|
||||
int finish_automount(struct vfsmount *m, struct path *path)
|
||||
{
|
||||
struct dentry *dentry = path->dentry;
|
||||
struct mount *mnt = real_mount(m);
|
||||
struct mountpoint *mp;
|
||||
struct mount *mnt;
|
||||
int err;
|
||||
|
||||
if (!m)
|
||||
return 0;
|
||||
if (IS_ERR(m))
|
||||
return PTR_ERR(m);
|
||||
|
||||
mnt = real_mount(m);
|
||||
/* The new mount record should have at least 2 refs to prevent it being
|
||||
* expired before we get a chance to add it
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user