diff options
Diffstat (limited to 'fs/ext3/xattr.c')
-rw-r--r-- | fs/ext3/xattr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index c6874be6d58b..24215dc09a18 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c | |||
@@ -546,8 +546,7 @@ ext3_xattr_set_entry(struct ext3_xattr_info *i, struct ext3_xattr_search *s) | |||
546 | free += EXT3_XATTR_LEN(name_len); | 546 | free += EXT3_XATTR_LEN(name_len); |
547 | } | 547 | } |
548 | if (i->value) { | 548 | if (i->value) { |
549 | if (free < EXT3_XATTR_SIZE(i->value_len) || | 549 | if (free < EXT3_XATTR_LEN(name_len) + |
550 | free < EXT3_XATTR_LEN(name_len) + | ||
551 | EXT3_XATTR_SIZE(i->value_len)) | 550 | EXT3_XATTR_SIZE(i->value_len)) |
552 | return -ENOSPC; | 551 | return -ENOSPC; |
553 | } | 552 | } |