f2fs: shrink node_write lock coverage
authorChao Yu <yuchao0@huawei.com>
Thu, 18 Jun 2020 06:36:23 +0000 (14:36 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 8 Jul 2020 04:51:44 +0000 (21:51 -0700)
commit79963d967b492876fa17c8c2c2c17b7438683d9b
tree6567a2612ff20d21ce355035717b31813e8697b7
parentfa6795552ad20509ffb1cc9ed1246b6b337f5da5
f2fs: shrink node_write lock coverage

- to avoid race between checkpoint and quota file writeback, it
just needs to hold read lock of node_write in writeback path.
- node_write lock has covered all LFS data write paths, it's not
necessary, we only need to hold node_write lock at write path of
quota file.

This refactors commit ca7f76e68074 ("f2fs: fix wrong discard space").

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/compress.c
fs/f2fs/data.c
fs/f2fs/segment.c