diff options
Diffstat (limited to 'fs/ext4/xattr.c')
-rw-r--r-- | fs/ext4/xattr.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 1e09fc77395c..759842ff8af0 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -55,7 +55,6 @@ | |||
55 | #include <linux/slab.h> | 55 | #include <linux/slab.h> |
56 | #include <linux/mbcache.h> | 56 | #include <linux/mbcache.h> |
57 | #include <linux/quotaops.h> | 57 | #include <linux/quotaops.h> |
58 | #include <linux/rwsem.h> | ||
59 | #include "ext4_jbd2.h" | 58 | #include "ext4_jbd2.h" |
60 | #include "ext4.h" | 59 | #include "ext4.h" |
61 | #include "xattr.h" | 60 | #include "xattr.h" |
@@ -639,8 +638,7 @@ ext4_xattr_set_entry(struct ext4_xattr_info *i, struct ext4_xattr_search *s) | |||
639 | free += EXT4_XATTR_LEN(name_len); | 638 | free += EXT4_XATTR_LEN(name_len); |
640 | } | 639 | } |
641 | if (i->value) { | 640 | if (i->value) { |
642 | if (free < EXT4_XATTR_SIZE(i->value_len) || | 641 | if (free < EXT4_XATTR_LEN(name_len) + |
643 | free < EXT4_XATTR_LEN(name_len) + | ||
644 | EXT4_XATTR_SIZE(i->value_len)) | 642 | EXT4_XATTR_SIZE(i->value_len)) |
645 | return -ENOSPC; | 643 | return -ENOSPC; |
646 | } | 644 | } |