summaryrefslogtreecommitdiff
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-08-09 03:14:06 +0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-08-09 09:57:56 +0400
commitdbe6a5ff4fa78bdfa983458c338831d91b35f315 (patch)
tree9cb566091b008512cdee731cb5502794c9d06c1a /fs/f2fs/node.h
parentc2d715d144af7209d035d0fe0b20a7a591c22c21 (diff)
downloadlinux-dbe6a5ff4fa78bdfa983458c338831d91b35f315.tar.xz
f2fs: fix the use of XATTR_NODE_OFFSET
This patch fixes the use of XATTR_NODE_OFFSET. o The offset should not use several MSB bits which are used by marking node blocks. o IS_DNODE should handle XATTR_NODE_OFFSET to avoid potential abnormality during the fsync call. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r--fs/f2fs/node.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 87349c4ea0ef..3496bb3e15dc 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -229,6 +229,10 @@ static inline block_t next_blkaddr_of_node(struct page *node_page)
static inline bool IS_DNODE(struct page *node_page)
{
unsigned int ofs = ofs_of_node(node_page);
+
+ if (ofs == XATTR_NODE_OFFSET)
+ return false;
+
if (ofs == 3 || ofs == 4 + NIDS_PER_BLOCK ||
ofs == 5 + 2 * NIDS_PER_BLOCK)
return false;