Skip to content

Commit

Permalink
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Apr 3, 2013
2 parents 17eb3d8 + 35e5cbc commit cd0e4a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/reiserfs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cd0e4a9

Please sign in to comment.