summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Liu <liuchao@coolpad.com>2022-05-19 18:40:10 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2022-05-19 17:23:22 -0700
commitd9c454ab2293f6b143d3d1be2bf54d766ed8bfc5 (patch)
treeb6408a627ea0bc9b00497a319f6300e160266970 /fs/f2fs
parent677a82b44ebf263d4f9a0cfbd576a6ade797a07b (diff)
downloadlinux-stable-d9c454ab2293f6b143d3d1be2bf54d766ed8bfc5.tar.gz
linux-stable-d9c454ab2293f6b143d3d1be2bf54d766ed8bfc5.tar.bz2
linux-stable-d9c454ab2293f6b143d3d1be2bf54d766ed8bfc5.zip
f2fs: make f2fs_read_inline_data() more readable
In f2fs_read_inline_data(), it is confused with checking of inline_data flag, as we checked it before calling. So this patch add some comments for f2fs_has_inline_data(). Signed-off-by: Chao Liu <liuchao@coolpad.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/f2fs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 000468bf06ca..52c34651f469 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3167,6 +3167,10 @@ static inline int inline_xattr_size(struct inode *inode)
return 0;
}
+/*
+ * Notice: check inline_data flag without inode page lock is unsafe.
+ * It could change at any time by f2fs_convert_inline_page().
+ */
static inline int f2fs_has_inline_data(struct inode *inode)
{
return is_inode_flag_set(inode, FI_INLINE_DATA);