Commit c143c233 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Al Viro

vfs: Remove d_drop calls from d_revalidate implementations

Now that d_invalidate always succeeds it is not longer necessary or
desirable to hard code d_drop calls into filesystem specific
d_revalidate implementations.

Remove the unnecessary d_drop calls and rely on d_invalidate
to drop the dentries.  Using d_invalidate ensures that paths
to mount points will not be dropped.
Reviewed-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 5542aa2f
...@@ -1069,7 +1069,6 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) ...@@ -1069,7 +1069,6 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags)
ceph_dentry_lru_touch(dentry); ceph_dentry_lru_touch(dentry);
} else { } else {
ceph_dir_clear_complete(dir); ceph_dir_clear_complete(dir);
d_drop(dentry);
} }
iput(dir); iput(dir);
return valid; return valid;
......
...@@ -1590,7 +1590,6 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags) ...@@ -1590,7 +1590,6 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
put_task_struct(task); put_task_struct(task);
return 1; return 1;
} }
d_drop(dentry);
return 0; return 0;
} }
...@@ -1727,9 +1726,6 @@ static int map_files_d_revalidate(struct dentry *dentry, unsigned int flags) ...@@ -1727,9 +1726,6 @@ static int map_files_d_revalidate(struct dentry *dentry, unsigned int flags)
put_task_struct(task); put_task_struct(task);
out_notask: out_notask:
if (status <= 0)
d_drop(dentry);
return status; return status;
} }
......
...@@ -129,8 +129,6 @@ static int tid_fd_revalidate(struct dentry *dentry, unsigned int flags) ...@@ -129,8 +129,6 @@ static int tid_fd_revalidate(struct dentry *dentry, unsigned int flags)
} }
put_task_struct(task); put_task_struct(task);
} }
d_drop(dentry);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment