Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195768
b: refs/heads/master
c: 5f5261a
h: refs/heads/master
v: v3
  • Loading branch information
Tao Ma authored and Joel Becker committed May 18, 2010
1 parent cf6fe7f commit 36a6d47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9ef75221a6247b758e1d7e18edb661996e4b7cf
refs/heads/master: 5f5261acb059f43c7fb9a2fac9d32c6ef4df2ed5
6 changes: 4 additions & 2 deletions trunk/fs/ocfs2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct ocfs2_xattr_set_ctxt {
struct ocfs2_alloc_context *meta_ac;
struct ocfs2_alloc_context *data_ac;
struct ocfs2_cached_dealloc_ctxt dealloc;
int set_abort;
};

#define OCFS2_XATTR_ROOT_SIZE (sizeof(struct ocfs2_xattr_def_value_root))
Expand Down Expand Up @@ -2135,6 +2136,7 @@ static int ocfs2_xa_prepare_entry(struct ocfs2_xa_loc *loc,
orig_clusters = ocfs2_xa_value_clusters(loc);
rc = ocfs2_xa_value_truncate(loc, xi->xi_value_len, ctxt);
if (rc < 0) {
ctxt->set_abort = 1;
ocfs2_xa_cleanup_value_truncate(loc, "growing",
orig_clusters);
/*
Expand Down Expand Up @@ -2946,7 +2948,7 @@ static int ocfs2_xattr_block_set(struct inode *inode,
ret = ocfs2_xa_set(&loc, xi, ctxt);
if (!ret)
xs->here = loc.xl_entry;
else if (ret != -ENOSPC)
else if ((ret != -ENOSPC) || ctxt->set_abort)
goto end;
else {
ret = ocfs2_xattr_create_index_block(inode, xs, ctxt);
Expand Down Expand Up @@ -3308,7 +3310,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
goto out;
}
ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt);
} else if (ret == -ENOSPC) {
} else if ((ret == -ENOSPC) && !ctxt->set_abort) {
if (di->i_xattr_loc && !xbs->xattr_bh) {
ret = ocfs2_xattr_block_find(inode,
xi->xi_name_index,
Expand Down

0 comments on commit 36a6d47

Please sign in to comment.