aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-02-13 13:19:10 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-10-09 02:38:58 -0400
commitc143c2333c48f1430231b31a8c17e074b9b504eb (patch)
treebe124eb194903b97429ad6914a7a02d55d969940 /fs
parent5542aa2fa7f6cddb03c4ac3135e390adffda98ca (diff)
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: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/dir.c1
-rw-r--r--fs/proc/base.c4
-rw-r--r--fs/proc/fd.c2
3 files changed, 0 insertions, 7 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index c29d6ae68874..b6c59eaa4f64 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -1069,7 +1069,6 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags)
1069 ceph_dentry_lru_touch(dentry); 1069 ceph_dentry_lru_touch(dentry);
1070 } else { 1070 } else {
1071 ceph_dir_clear_complete(dir); 1071 ceph_dir_clear_complete(dir);
1072 d_drop(dentry);
1073 } 1072 }
1074 iput(dir); 1073 iput(dir);
1075 return valid; 1074 return valid;
diff --git a/fs/proc/base.c b/fs/proc/base.c
index baf852b648ad..b4fe0ee08942 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1590,7 +1590,6 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
1590 put_task_struct(task); 1590 put_task_struct(task);
1591 return 1; 1591 return 1;
1592 } 1592 }
1593 d_drop(dentry);
1594 return 0; 1593 return 0;
1595} 1594}
1596 1595
@@ -1727,9 +1726,6 @@ out:
1727 put_task_struct(task); 1726 put_task_struct(task);
1728 1727
1729out_notask: 1728out_notask:
1730 if (status <= 0)
1731 d_drop(dentry);
1732
1733 return status; 1729 return status;
1734} 1730}
1735 1731
diff --git a/fs/proc/fd.c b/fs/proc/fd.c
index 955bb55fab8c..e11d7c590bb0 100644
--- a/fs/proc/fd.c
+++ b/fs/proc/fd.c
@@ -129,8 +129,6 @@ static int tid_fd_revalidate(struct dentry *dentry, unsigned int flags)
129 } 129 }
130 put_task_struct(task); 130 put_task_struct(task);
131 } 131 }
132
133 d_drop(dentry);
134 return 0; 132 return 0;
135} 133}
136 134