diff options
author | Jan Kara <jack@suse.cz> | 2021-04-13 18:10:37 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2021-07-13 14:29:01 +0200 |
commit | edc6d01bad7331b376a1a8f5c6d8e9221e9f9f37 (patch) | |
tree | 5cca3b28b2310be5cc9a5a43acea7df7bec4756f /fs/f2fs/super.c | |
parent | zonefs: Convert to using invalidate_lock (diff) | |
download | linux-edc6d01bad7331b376a1a8f5c6d8e9221e9f9f37.tar.xz linux-edc6d01bad7331b376a1a8f5c6d8e9221e9f9f37.zip |
f2fs: Convert to using invalidate_lock
Use invalidate_lock instead of f2fs' private i_mmap_sem. The intended
purpose is exactly the same. By this conversion we fix a long standing
race between hole punching and read(2) / readahead(2) paths that can
lead to stale page cache contents.
CC: Jaegeuk Kim <jaegeuk@kernel.org>
CC: Chao Yu <yuchao0@huawei.com>
CC: linux-f2fs-devel@lists.sourceforge.net
Acked-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 8fecd3050ccd..ce2ab1b85c11 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1289,7 +1289,6 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb) mutex_init(&fi->inmem_lock); init_rwsem(&fi->i_gc_rwsem[READ]); init_rwsem(&fi->i_gc_rwsem[WRITE]); - init_rwsem(&fi->i_mmap_sem); init_rwsem(&fi->i_xattr_sem); /* Will be used by directory only */ |