linux-stable/fs/ceph
Alex Elder 83eb26af0d 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>
2012-01-12 11:00:51 -08:00
..
addr.c ceph: use i_ceph_lock instead of i_lock 2011-12-07 10:46:44 -08:00
caps.c ceph: use i_ceph_lock instead of i_lock 2011-12-07 10:46:44 -08:00
ceph_frag.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
debugfs.c ceph: explicitly reference rename old_dentry parent dir in request 2011-07-26 11:31:14 -07:00
dir.c ceph: enable/disable dentry complete flags via mount option 2012-01-12 11:00:40 -08:00
export.c ceph: avoid useless dget/dput in encode_fh 2012-01-10 08:57:00 -08:00
file.c ceph: fix SEEK_CUR, SEEK_SET regression 2011-12-13 09:19:26 -08:00
inode.c ceph: dereference pointer after checking for NULL 2012-01-10 08:56:59 -08:00
ioctl.c ceph: use i_ceph_lock instead of i_lock 2011-12-07 10:46:44 -08:00
ioctl.h ceph: document ioctls 2011-10-25 16:10:15 -07:00
Kconfig ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
locks.c ceph: unwind canceled flock state 2011-06-07 21:36:45 -07:00
Makefile ceph: Makefile: Remove unnessary code 2011-01-12 15:15:13 -08:00
mds_client.c ceph: remove unnecessary d_fsdata conditional checks 2012-01-10 08:56:56 -08:00
mds_client.h ceph: use i_ceph_lock instead of i_lock 2011-12-07 10:46:44 -08:00
mdsmap.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
snap.c ceph: use i_ceph_lock instead of i_lock 2011-12-07 10:46:44 -08:00
strings.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
super.c ceph: enable/disable dentry complete flags via mount option 2012-01-12 11:00:40 -08:00
super.h ceph: enable/disable dentry complete flags via mount option 2012-01-12 11:00:40 -08:00
xattr.c ceph: ensure prealloc_blob is in place when removing xattr 2012-01-12 11:00:51 -08:00