summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-03 10:49:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-03 10:49:27 -0700
commitcd0e4a9dd432b2f0209d84b5b2420695c1fd3eb7 (patch)
treee197878dc16752958d00cc56d7f1b52e4bd3e631 /fs
parent17eb3d8fbe4c573426fc99946040305e79c07803 (diff)
parent35e5cbc0af240778e61113286c019837e06aeec6 (diff)
downloadop-kernel-dev-cd0e4a9dd432b2f0209d84b5b2420695c1fd3eb7.zip
op-kernel-dev-cd0e4a9dd432b2f0209d84b5b2420695c1fd3eb7.tar.gz
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 c196369..4cce1d9 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);
OpenPOWER on IntegriCloud