summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index d677290b0aca..ceb7b491d1b9 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -358,14 +358,11 @@ static void dentry_unlink_inode(struct dentry * dentry)
358 __releases(dentry->d_inode->i_lock) 358 __releases(dentry->d_inode->i_lock)
359{ 359{
360 struct inode *inode = dentry->d_inode; 360 struct inode *inode = dentry->d_inode;
361 bool hashed = !d_unhashed(dentry);
362 361
363 if (hashed) 362 raw_write_seqcount_begin(&dentry->d_seq);
364 raw_write_seqcount_begin(&dentry->d_seq);
365 __d_clear_type_and_inode(dentry); 363 __d_clear_type_and_inode(dentry);
366 hlist_del_init(&dentry->d_u.d_alias); 364 hlist_del_init(&dentry->d_u.d_alias);
367 if (hashed) 365 raw_write_seqcount_end(&dentry->d_seq);
368 raw_write_seqcount_end(&dentry->d_seq);
369 spin_unlock(&dentry->d_lock); 366 spin_unlock(&dentry->d_lock);
370 spin_unlock(&inode->i_lock); 367 spin_unlock(&inode->i_lock);
371 if (!inode->i_nlink) 368 if (!inode->i_nlink)