]> bbs.cooldavid.org Git - net-next-2.6.git/commit
ocfs2: Set xattr block entries with ocfs2_xa_set()
authorJoel Becker <joel.becker@oracle.com>
Wed, 19 Aug 2009 09:13:50 +0000 (02:13 -0700)
committerJoel Becker <joel.becker@oracle.com>
Fri, 26 Feb 2010 23:41:13 +0000 (15:41 -0800)
commitd3981544d7a4ed276966cdd58fe2f5d6e8a585d9
treea2a90d6a67c40fac4b56edd524b08a8c52179570
parentc5d95df5f78312c879f3058059c98a08821897a5
ocfs2: Set xattr block entries with ocfs2_xa_set()

ocfs2_xattr_block_set() calls into ocfs2_xattr_set_entry() with just the
HAS_XATTR flag.  Most of the machinery of ocfs2_xattr_set_entry() is
skipped.  All that really happens other than the call to ocfs2_xa_set()
is making sure the HAS_XATTR flag is set on the inode.

But HAS_XATTR should be set when we also set di->i_xattr_loc.  And
that's done in ocfs2_create_xattr_block().  So let's move it there, and
then ocfs2_xattr_block_set() can just call ocfs2_xa_set().

While we're there, ocfs2_create_xattr_block() can take the set_ctxt for
a smaller argument list.  It also learns to set HAS_XATTR_FL, because it
knows for sure.  ocfs2_create_empty_xatttr_block() in the reflink path
fakes a set_ctxt to call ocfs2_create_xattr_block().

Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/xattr.c