Skip to content

Commit

Permalink
reiserfs: use generic xattr handlers
Browse files Browse the repository at this point in the history
Christoph Hellwig had asked me quite some time ago to port the reiserfs
xattrs to the generic xattr interface.

This patch replaces the reiserfs-specific xattr handling code with the
generic struct xattr_handler.

However, since reiserfs doesn't split the prefix and name when accessing
xattrs, it can't leverage generic_{set,get,list,remove}xattr without
needlessly reconstructing the name on the back end.

Update 7/26/07: Added missing dput() to deletion path.
Update 8/30/07: Added missing mark_inode_dirty when i_mode is used to
                represent an ACL and no previous ACL existed.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jeff Mahoney authored and Linus Torvalds committed Mar 30, 2009
1 parent 8ecbe55 commit 48b32a3
Show file tree
Hide file tree
Showing 9 changed files with 258 additions and 441 deletions.
7 changes: 0 additions & 7 deletions fs/reiserfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2263,9 +2263,6 @@ static int __init init_reiserfs_fs(void)
return ret;
}

if ((ret = reiserfs_xattr_register_handlers()))
goto failed_reiserfs_xattr_register_handlers;

reiserfs_proc_info_global_init();
reiserfs_proc_register_global("version",
reiserfs_global_version_in_proc);
Expand All @@ -2276,9 +2273,6 @@ static int __init init_reiserfs_fs(void)
return 0;
}

reiserfs_xattr_unregister_handlers();

failed_reiserfs_xattr_register_handlers:
reiserfs_proc_unregister_global("version");
reiserfs_proc_info_global_done();
destroy_inodecache();
Expand All @@ -2288,7 +2282,6 @@ static int __init init_reiserfs_fs(void)

static void __exit exit_reiserfs_fs(void)
{
reiserfs_xattr_unregister_handlers();
reiserfs_proc_unregister_global("version");
reiserfs_proc_info_global_done();
unregister_filesystem(&reiserfs_fs_type);
Expand Down
Loading

0 comments on commit 48b32a3

Please sign in to comment.