* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
(xattr_type == XATTR_LUSTRE_T && strcmp(name, "lustre.lov") == 0))
RETURN(0);
+ /* b15587: ignore security.capability xattr for now */
+ if ((xattr_type == XATTR_SECURITY_T &&
+ strcmp(name, "security.capability") == 0))
+ RETURN(0);
+
#ifdef CONFIG_FS_POSIX_ACL
if (sbi->ll_flags & LL_SBI_RMT_CLIENT &&
(xattr_type == XATTR_ACL_ACCESS_T ||
/* Attributes that are saved via getxattr will always have
* the stripe_offset as 0. Instead, the MDS should be
* allowed to pick the starting OST index. b=17846 */
- if (lump->lmm_stripe_offset == 0)
+ if (lump != NULL && lump->lmm_stripe_offset == 0)
lump->lmm_stripe_offset = -1;
- if (S_ISREG(inode->i_mode)) {
+ if (lump != NULL && S_ISREG(inode->i_mode)) {
struct file f;
int flags = FMODE_WRITE;
if (rc)
RETURN(rc);
+ /* b15587: ignore security.capability xattr for now */
+ if ((xattr_type == XATTR_SECURITY_T &&
+ strcmp(name, "security.capability") == 0))
+ RETURN(-ENODATA);
+
#ifdef CONFIG_FS_POSIX_ACL
if (sbi->ll_flags & LL_SBI_RMT_CLIENT &&
(xattr_type == XATTR_ACL_ACCESS_T ||