hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8PWEP CVE: NA
--------------------------------------
commit d033cb6784c4 ("mount: make {lock,unlock}_mount_hash() static") moves {lock, unlock}_mount_hash to fs/namespace.c due to the two functions are only used in the file.
memcg_memfs_info feature needs to reference the two functions, move them back to fs/mount.h.
Signed-off-by: Jinjiang Tu tujinjiang@huawei.com --- fs/mount.h | 10 ++++++++++ fs/namespace.c | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/fs/mount.h b/fs/mount.h index 130c07c2f8d2..3c2fbb78cae2 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -123,6 +123,16 @@ static inline void get_mnt_ns(struct mnt_namespace *ns)
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 mnt_namespace *ns; struct path root; diff --git a/fs/namespace.c b/fs/namespace.c index e157efc54023..a10ff870c862 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -99,16 +99,6 @@ EXPORT_SYMBOL_GPL(fs_kobj); */ __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) { unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES);