summaryrefslogtreecommitdiffstats
path: root/fs/ceph/dir.c
diff options
context:
space:
mode:
authorAlex Elder <elder@dreamhost.com>2012-01-12 02:41:01 +0100
committerSage Weil <sage@newdream.net>2012-01-12 20:00:51 +0100
commit83eb26af0db71f2dfe551405c55d982288fa6178 (patch)
treec7bc62a810483e328cbe2b931416e58ec655ab9b /fs/ceph/dir.c
parentrbd: initialize snap_rwsem in rbd_add() (diff)
downloadlinux-83eb26af0db71f2dfe551405c55d982288fa6178.tar.xz
linux-83eb26af0db71f2dfe551405c55d982288fa6178.zip
ceph: ensure prealloc_blob is in place when removing xattr
In __ceph_build_xattrs_blob(), if a ceph inode's extended attributes are marked dirty, all attributes recorded in its rb_tree index are formatted into a "blob" buffer. The target buffer is recorded in ceph_inode->i_xattrs.prealloc_blob, and it is expected to exist and be of sufficient size to hold the attributes. The extended attributes are marked dirty in two cases: when a new attribute is added to the inode; or when one is removed. In the former case work is done to ensure the prealloc_blob buffer is properly set up, but in the latter it is not. Change the logic in ceph_removexattr() so it matches what is done in ceph_setxattr(). Note that this is done in a way that keeps the two blocks of code nearly identical, in anticipation of a subsequent patch that encapsulates some of this logic into one or more helper routines. Signed-off-by: Alex Elder <elder@dreamhost.com> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/dir.c')
0 files changed, 0 insertions, 0 deletions