/* 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;
struct ll_inode_info *lli = ll_i2info(inode);
struct posix_acl *acl;
- spin_lock(&lli->lli_lock);
+ cfs_spin_lock(&lli->lli_lock);
acl = posix_acl_dup(lli->lli_posix_acl);
- spin_unlock(&lli->lli_lock);
+ cfs_spin_unlock(&lli->lli_lock);
if (!acl)
RETURN(-ENODATA);