Commit d033cb67 authored by Christian Brauner's avatar Christian Brauner

mount: make {lock,unlock}_mount_hash() static

The lock_mount_hash() and unlock_mount_hash() helpers are never called
outside a single file. Remove them from the header and make them static
to reflect this fact. There's no need to have them callable from other
places right now, as Christoph observed.

Link: https://lore.kernel.org/r/20210121131959.646623-31-christian.brauner@ubuntu.com
Cc: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Suggested-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 68847c94
...@@ -124,16 +124,6 @@ static inline void get_mnt_ns(struct mnt_namespace *ns) ...@@ -124,16 +124,6 @@ static inline void get_mnt_ns(struct mnt_namespace *ns)
extern seqlock_t mount_lock; extern seqlock_t mount_lock;
static inline void lock_mount_hash(void)
{
write_seqlock(&mount_lock);
}
static inline void unlock_mount_hash(void)
{
write_sequnlock(&mount_lock);
}
struct proc_mounts { struct proc_mounts {
struct mnt_namespace *ns; struct mnt_namespace *ns;
struct path root; struct path root;
......
...@@ -87,6 +87,16 @@ EXPORT_SYMBOL_GPL(fs_kobj); ...@@ -87,6 +87,16 @@ EXPORT_SYMBOL_GPL(fs_kobj);
*/ */
__cacheline_aligned_in_smp DEFINE_SEQLOCK(mount_lock); __cacheline_aligned_in_smp DEFINE_SEQLOCK(mount_lock);
static inline void lock_mount_hash(void)
{
write_seqlock(&mount_lock);
}
static inline void unlock_mount_hash(void)
{
write_sequnlock(&mount_lock);
}
static inline struct hlist_head *m_hash(struct vfsmount *mnt, struct dentry *dentry) static inline struct hlist_head *m_hash(struct vfsmount *mnt, struct dentry *dentry)
{ {
unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES); unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment