diff options
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r-- | fs/ocfs2/xattr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 4ddd788add67..c63efb5ef136 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -547,8 +547,12 @@ int ocfs2_calc_xattr_init(struct inode *dir, | |||
547 | * when blocksize = 512, may reserve one more cluser for | 547 | * when blocksize = 512, may reserve one more cluser for |
548 | * xattr bucket, otherwise reserve one metadata block | 548 | * xattr bucket, otherwise reserve one metadata block |
549 | * for them is ok. | 549 | * for them is ok. |
550 | * If this is a new directory with inline data, | ||
551 | * we choose to reserve the entire inline area for | ||
552 | * directory contents and force an external xattr block. | ||
550 | */ | 553 | */ |
551 | if (dir->i_sb->s_blocksize == OCFS2_MIN_BLOCKSIZE || | 554 | if (dir->i_sb->s_blocksize == OCFS2_MIN_BLOCKSIZE || |
555 | (S_ISDIR(mode) && ocfs2_supports_inline_data(osb)) || | ||
552 | (s_size + a_size) > OCFS2_XATTR_FREE_IN_IBODY) { | 556 | (s_size + a_size) > OCFS2_XATTR_FREE_IN_IBODY) { |
553 | ret = ocfs2_reserve_new_metadata_blocks(osb, 1, xattr_ac); | 557 | ret = ocfs2_reserve_new_metadata_blocks(osb, 1, xattr_ac); |
554 | if (ret) { | 558 | if (ret) { |