summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-07-28 13:05:50 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-07-29 17:28:58 -0400
commitd614146d18159e54d4dfc289e4c1534ccc485cf2 (patch)
tree60c87c3c1af635106d8d1c3ae4fcdc73e5c4a1c2 /fs/dcache.c
parent1a81a8f2a5918956e214bb718099a89e500e7ec5 (diff)
fold dentry_rcuwalk_invalidate() into its only remaining caller
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index b90cf8e09d5b..6a629f50c3cf 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -316,20 +316,6 @@ static void dentry_free(struct dentry *dentry)
316 call_rcu(&dentry->d_u.d_rcu, __d_free); 316 call_rcu(&dentry->d_u.d_rcu, __d_free);
317} 317}
318 318
319/**
320 * dentry_rcuwalk_invalidate - invalidate in-progress rcu-walk lookups
321 * @dentry: the target dentry
322 * After this call, in-progress rcu-walk path lookup will fail. This
323 * should be called after unhashing, and after changing d_inode (if
324 * the dentry has not already been unhashed).
325 */
326static inline void dentry_rcuwalk_invalidate(struct dentry *dentry)
327{
328 lockdep_assert_held(&dentry->d_lock);
329 /* Go through am invalidation barrier */
330 write_seqcount_invalidate(&dentry->d_seq);
331}
332
333/* 319/*
334 * Release the dentry's inode, using the filesystem 320 * Release the dentry's inode, using the filesystem
335 * d_iput() operation if defined. 321 * d_iput() operation if defined.
@@ -468,7 +454,8 @@ void __d_drop(struct dentry *dentry)
468 __hlist_bl_del(&dentry->d_hash); 454 __hlist_bl_del(&dentry->d_hash);
469 dentry->d_hash.pprev = NULL; 455 dentry->d_hash.pprev = NULL;
470 hlist_bl_unlock(b); 456 hlist_bl_unlock(b);
471 dentry_rcuwalk_invalidate(dentry); 457 /* After this call, in-progress rcu-walk path lookup will fail. */
458 write_seqcount_invalidate(&dentry->d_seq);
472 } 459 }
473} 460}
474EXPORT_SYMBOL(__d_drop); 461EXPORT_SYMBOL(__d_drop);