diff options
author | Filipe Manana <fdmanana@suse.com> | 2024-04-09 17:41:05 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-05-07 21:31:07 +0200 |
commit | 65bb9fb00b7012a78b2f5d1cd042bf098900c5d3 (patch) | |
tree | 60c301e1dc98220db04ae6cfa4fba63ac27abba6 /fs/btrfs/btrfs_inode.h | |
parent | btrfs: add a shrinker for extent maps (diff) | |
download | linux-65bb9fb00b7012a78b2f5d1cd042bf098900c5d3.tar.xz linux-65bb9fb00b7012a78b2f5d1cd042bf098900c5d3.zip |
btrfs: update comment for btrfs_set_inode_full_sync() about locking
Nowadays we have a lock used to synchronize mmap writes with reflink and
fsync operations (struct btrfs_inode::i_mmap_lock), so update the comment
for btrfs_set_inode_full_sync() to mention that it can also be called
while holding that mmap lock. Besides being a valid alternative to the
inode's VFS lock, we already have the extent map shrinker using that mmap
lock instead.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 9a87ada7fe52..91c994b569f3 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -381,9 +381,11 @@ static inline void btrfs_set_inode_last_sub_trans(struct btrfs_inode *inode) } /* - * Should be called while holding the inode's VFS lock in exclusive mode or in a - * context where no one else can access the inode concurrently (during inode - * creation or when loading an inode from disk). + * Should be called while holding the inode's VFS lock in exclusive mode, or + * while holding the inode's mmap lock (struct btrfs_inode::i_mmap_lock) in + * either shared or exclusive mode, or in a context where no one else can access + * the inode concurrently (during inode creation or when loading an inode from + * disk). */ static inline void btrfs_set_inode_full_sync(struct btrfs_inode *inode) { |