mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 11:54:37 +08:00
fold dentry_rcuwalk_invalidate() into its only remaining caller
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
1a81a8f2a5
commit
d614146d18
17
fs/dcache.c
17
fs/dcache.c
@ -316,20 +316,6 @@ static void dentry_free(struct dentry *dentry)
|
|||||||
call_rcu(&dentry->d_u.d_rcu, __d_free);
|
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
|
* Release the dentry's inode, using the filesystem
|
||||||
* d_iput() operation if defined.
|
* d_iput() operation if defined.
|
||||||
@ -468,7 +454,8 @@ void __d_drop(struct dentry *dentry)
|
|||||||
__hlist_bl_del(&dentry->d_hash);
|
__hlist_bl_del(&dentry->d_hash);
|
||||||
dentry->d_hash.pprev = NULL;
|
dentry->d_hash.pprev = NULL;
|
||||||
hlist_bl_unlock(b);
|
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);
|
EXPORT_SYMBOL(__d_drop);
|
||||||
|
Loading…
Reference in New Issue
Block a user