Commit b30f14c4 authored by Junxiao Bi's avatar Junxiao Bi Committed by Linus Torvalds

ocfs2: xattr: remove useless free space checking

Free space checking will be done in ocfs2_xattr_ibody_init().  So remove
here.

[akpm@linux-foundation.org: remove unused local]
Signed-off-by: default avatarJunxiao Bi <junxiao.bi@oracle.com>
Reviewed-by: default avatarJie Liu <jeff.liu@oracle.com>
Acked-by: default avatarJoel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d3e3b41b
...@@ -2751,20 +2751,12 @@ static int ocfs2_xattr_ibody_set(struct inode *inode, ...@@ -2751,20 +2751,12 @@ static int ocfs2_xattr_ibody_set(struct inode *inode,
{ {
int ret; int ret;
struct ocfs2_inode_info *oi = OCFS2_I(inode); struct ocfs2_inode_info *oi = OCFS2_I(inode);
struct ocfs2_dinode *di = (struct ocfs2_dinode *)xs->inode_bh->b_data;
struct ocfs2_xa_loc loc; struct ocfs2_xa_loc loc;
if (inode->i_sb->s_blocksize == OCFS2_MIN_BLOCKSIZE) if (inode->i_sb->s_blocksize == OCFS2_MIN_BLOCKSIZE)
return -ENOSPC; return -ENOSPC;
down_write(&oi->ip_alloc_sem); down_write(&oi->ip_alloc_sem);
if (!(oi->ip_dyn_features & OCFS2_INLINE_XATTR_FL)) {
if (!ocfs2_xattr_has_space_inline(inode, di)) {
ret = -ENOSPC;
goto out;
}
}
if (!(oi->ip_dyn_features & OCFS2_INLINE_XATTR_FL)) { if (!(oi->ip_dyn_features & OCFS2_INLINE_XATTR_FL)) {
ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt); ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment