diff --git a/[refs] b/[refs] index d421c2498b41..9931bf6c0266 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: de29c08528bae45e3fa1171d190f1340e37e0f70 +refs/heads/master: 6c1e183e12dbd78a897a859f13220406296fee31 diff --git a/trunk/fs/ocfs2/xattr.c b/trunk/fs/ocfs2/xattr.c index 70baffeb1812..054e2efb0b7e 100644 --- a/trunk/fs/ocfs2/xattr.c +++ b/trunk/fs/ocfs2/xattr.c @@ -777,6 +777,11 @@ static int ocfs2_xattr_block_get(struct inode *inode, goto cleanup; } + if (xs->not_found) { + ret = -ENODATA; + goto cleanup; + } + xb = (struct ocfs2_xattr_block *)xs->xattr_bh->b_data; size = le64_to_cpu(xs->here->xe_value_size); if (buffer) { @@ -860,7 +865,7 @@ static int ocfs2_xattr_get(struct inode *inode, down_read(&oi->ip_xattr_sem); ret = ocfs2_xattr_ibody_get(inode, name_index, name, buffer, buffer_size, &xis); - if (ret == -ENODATA) + if (ret == -ENODATA && di->i_xattr_loc) ret = ocfs2_xattr_block_get(inode, name_index, name, buffer, buffer_size, &xbs); up_read(&oi->ip_xattr_sem);