diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-03-30 22:02:40 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 23:16:38 +0400 |
commit | a41f1a4715f26f7bc4d047d0bc7710145c8e69c7 (patch) | |
tree | 8b5d94368e774ec490619593300e8b3f4b7c5cb1 /include/linux/dynamic_printk.h | |
parent | 0ab2621ebd9a28bf7a524ecd50d492a10579dfcc (diff) | |
download | linux-a41f1a4715f26f7bc4d047d0bc7710145c8e69c7.tar.xz |
reiserfs: use generic readdir for operations across all xattrs
The current reiserfs xattr implementation open codes reiserfs_readdir
and frees the path before calling the filldir function. Typically, the
filldir function is something that modifies the file system, such as a
chown or an inode deletion that also require reading of an inode
associated with each direntry. Since the file system is modified, the
path retained becomes invalid for the next run. In addition, it runs
backwards in attempt to minimize activity.
This is clearly suboptimal from a code cleanliness perspective as well
as performance-wise.
This patch implements a generic reiserfs_for_each_xattr that uses the
generic readdir and a specific filldir routine that simply populates an
array of dentries and then performs a specific operation on them. When
all files have been operated on, it then calls the operation on the
directory itself.
The result is a noticable code reduction and better performance.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/dynamic_printk.h')
0 files changed, 0 insertions, 0 deletions