X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=fs%2Fdcache.c;h=6a629f50c3cf530491ac0cbc3ff669d218aca20a;hb=d614146d18159e54d4dfc289e4c1534ccc485cf2;hp=b90cf8e09d5b90525330917a834b3153f86528df;hpb=884316deb4c9fdf9becfa31831a9e40717e3026c;p=cascardo%2Flinux.git 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) call_rcu(&dentry->d_u.d_rcu, __d_free); } -/** - * dentry_rcuwalk_invalidate - invalidate in-progress rcu-walk lookups - * @dentry: the target dentry - * After this call, in-progress rcu-walk path lookup will fail. This - * should be called after unhashing, and after changing d_inode (if - * the dentry has not already been unhashed). - */ -static inline void dentry_rcuwalk_invalidate(struct dentry *dentry) -{ - lockdep_assert_held(&dentry->d_lock); - /* Go through am invalidation barrier */ - write_seqcount_invalidate(&dentry->d_seq); -} - /* * Release the dentry's inode, using the filesystem * d_iput() operation if defined. @@ -468,7 +454,8 @@ void __d_drop(struct dentry *dentry) __hlist_bl_del(&dentry->d_hash); dentry->d_hash.pprev = NULL; hlist_bl_unlock(b); - dentry_rcuwalk_invalidate(dentry); + /* After this call, in-progress rcu-walk path lookup will fail. */ + write_seqcount_invalidate(&dentry->d_seq); } } EXPORT_SYMBOL(__d_drop);