Message ID | 20201128213527.2669807-3-christian.brauner@ubuntu.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | idmapped mounts | expand |
On Sat, Nov 28, 2020 at 10:34:51PM +0100, Christian Brauner wrote: > 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. You are spilling over the usual 73 chars for commit logs, so please check this and the other patches. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>
On Tue, Dec 01, 2020 at 11:32:03AM +0100, Christoph Hellwig wrote: > On Sat, Nov 28, 2020 at 10:34:51PM +0100, Christian Brauner wrote: > > 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. > > You are spilling over the usual 73 chars for commit logs, so please check > this and the other patches. I've changed all commit messages to adhere to a 73 character limit. > > Otherwise looks good: > > Reviewed-by: Christoph Hellwig <hch@lst.de> Thanks! Christian
diff --git a/fs/mount.h b/fs/mount.h index c7abb7b394d8..562d96d57bad 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -125,16 +125,6 @@ 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 f183161833ad..798bbf4f48ad 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -87,6 +87,16 @@ 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);
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. Suggested-by: Christoph Hellwig <hch@lst.de> Cc: David Howells <dhowells@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> --- /* v2 */ - Christoph Hellwig <hch@lst.de>: - Add a patch to make {lock,unlock)_mount_hash() static. /* v3 */ unchanged --- fs/mount.h | 10 ---------- fs/namespace.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-)