summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-03 19:49:27 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-03 19:49:27 +0200
commitcd0e4a9dd432b2f0209d84b5b2420695c1fd3eb7 (patch)
treee197878dc16752958d00cc56d7f1b52e4bd3e631 /fs
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s39... (diff)
parentreiserfs: Fix warning and inode leak when deleting inode with xattrs (diff)
downloadlinux-cd0e4a9dd432b2f0209d84b5b2420695c1fd3eb7.tar.xz
linux-cd0e4a9dd432b2f0209d84b5b2420695c1fd3eb7.zip
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull reiserfs fix from Jan Kara: "A fix for reiserfs xattr bug exposed by changes to lookup_one_len()" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: reiserfs: Fix warning and inode leak when deleting inode with xattrs
Diffstat (limited to 'fs')
-rw-r--r--fs/reiserfs/xattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index c196369fe408..4cce1d9552fb 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -187,8 +187,8 @@ fill_with_dentries(void *buf, const char *name, int namelen, loff_t offset,
if (dbuf->count == ARRAY_SIZE(dbuf->dentries))
return -ENOSPC;
- if (name[0] == '.' && (name[1] == '\0' ||
- (name[1] == '.' && name[2] == '\0')))
+ if (name[0] == '.' && (namelen < 2 ||
+ (namelen == 2 && name[1] == '.')))
return 0;
dentry = lookup_one_len(name, dbuf->xadir, namelen);