diff options
author | Jeff Mahoney <jeffm@jeffreymahoney.com> | 2013-05-31 21:07:52 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-05-31 23:13:58 +0200 |
commit | 0bdc7acba56a7ca4232f15f37b16f7ec079385ab (patch) | |
tree | 86b25345b4c252d5bbbe43387de26a804c4d679d /fs/nls | |
parent | Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux (diff) | |
download | linux-0bdc7acba56a7ca4232f15f37b16f7ec079385ab.tar.xz linux-0bdc7acba56a7ca4232f15f37b16f7ec079385ab.zip |
reiserfs: fix spurious multiple-fill in reiserfs_readdir_dentry
After sleeping for filldir(), we check to see if the file system has
changed and research. The next_pos pointer is updated but its value
isn't pushed into the key used for the search itself. As a result,
the search returns the same item that the last cycle of the loop did
and filldir() is called multiple times with the same data.
The end result is that the buffer can contain the same name multiple
times. This can be returned to userspace or used internally in the
xattr code where it can manifest with the following warning:
jdm-20004 reiserfs_delete_xattrs: Couldn't delete all xattrs (-2)
reiserfs_for_each_xattr uses reiserfs_readdir_dentry to iterate over
the xattr names and ends up trying to unlink the same name twice. The
second attempt fails with -ENOENT and the error is returned. At some
point I'll need to add support into reiserfsck to remove the orphaned
directories left behind when this occurs.
The fix is to push the value into the key before researching.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/nls')
0 files changed, 0 insertions, 0 deletions