ocfs2: xattr: remove useless free space checking
authorJunxiao Bi <junxiao.bi@oracle.com>
Wed, 3 Jul 2013 22:00:55 +0000 (15:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:24 +0000 (16:07 -0700)
Free space checking will be done in ocfs2_xattr_ibody_init().  So remove
here.

[akpm@linux-foundation.org: remove unused local]
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/xattr.c

index 2e3ea30..0deabcd 100644 (file)
@@ -2751,20 +2751,12 @@ static int ocfs2_xattr_ibody_set(struct inode *inode,
 {
        int ret;
        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;
 
        if (inode->i_sb->s_blocksize == OCFS2_MIN_BLOCKSIZE)
                return -ENOSPC;
 
        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)) {
                ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt);
                if (ret) {