]> Pileus Git - ~andy/linux/blobdiff - fs/f2fs/xattr.c
f2fs: handle errors correctly during f2fs_reserve_block
[~andy/linux] / fs / f2fs / xattr.c
index aa7a3f139fe5336130d10dcfbe9813fa7ca95698..b0fb8a27f3da6fe3b810eca732361953aeebc030 100644 (file)
@@ -522,7 +522,7 @@ static int __f2fs_setxattr(struct inode *inode, int name_index,
                if (found)
                        free = free + ENTRY_SIZE(here);
 
-               if (free < newsize) {
+               if (unlikely(free < newsize)) {
                        error = -ENOSPC;
                        goto exit;
                }