summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorChao Yu2014-03-17 09:35:06 +0100
committerJaegeuk Kim2014-03-18 01:29:46 +0100
commit4bc8e9bcf50103216a7a316ab66b9bb8e81baa27 (patch)
tree5ad730ee7f19734aa11ae9a55ec025727115251e /fs/f2fs/node.c
parentf2fs: print type for each segment in segment_info's show (diff)
downloadkernel-qcow2-linux-4bc8e9bcf50103216a7a316ab66b9bb8e81baa27.tar.gz
kernel-qcow2-linux-4bc8e9bcf50103216a7a316ab66b9bb8e81baa27.tar.xz
kernel-qcow2-linux-4bc8e9bcf50103216a7a316ab66b9bb8e81baa27.zip
f2fs: introduce f2fs_has_xattr_block for better readability
This patch introduces a help function f2fs_has_xattr_block for better readability. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index c618fad3e6c3..3e36240d81c1 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -836,7 +836,7 @@ struct page *new_node_page(struct dnode_of_data *dn,
SetPageUptodate(page);
set_page_dirty(page);
- if (ofs == XATTR_NODE_OFFSET)
+ if (f2fs_has_xattr_block(ofs))
F2FS_I(dn->inode)->i_xattr_nid = dn->nid;
dn->node_page = page;
@@ -1533,7 +1533,7 @@ bool recover_xattr_data(struct inode *inode, struct page *page, block_t blkaddr)
recover_inline_xattr(inode, page);
- if (ofs_of_node(page) != XATTR_NODE_OFFSET)
+ if (!f2fs_has_xattr_block(ofs_of_node(page)))
return false;
/* 1: invalidate the previous xattr nid */