f2fs: give -E2BIG for no space in xattr
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 Apr 2016 18:52:30 +0000 (11:52 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 15 Apr 2016 15:50:25 +0000 (08:50 -0700)
This patch returns -E2BIG if there is no space to add an xattr entry.
This should fix generic/026 in xfstests as well.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/xattr.c

index 06a72dc0191a022049bbf48ad26e127bb6211c02..152971243ad84eb0bd1a4d08f59df3020b793675 100644 (file)
@@ -500,7 +500,7 @@ static int __f2fs_setxattr(struct inode *inode, int index,
                        free = free + ENTRY_SIZE(here);
 
                if (unlikely(free < newsize)) {
-                       error = -ENOSPC;
+                       error = -E2BIG;
                        goto exit;
                }
        }