Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195766
b: refs/heads/master
c: d5a7df0
h: refs/heads/master
v: v3
  • Loading branch information
Tao Ma authored and Joel Becker committed May 18, 2010
1 parent bbe9cd2 commit 1b19775
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 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: 41841b0bcea8af7f3bff8b2a23d542b94d9c1bb1
refs/heads/master: d5a7df0649fa6a1e7800785d760e2c7d7a3204de
17 changes: 10 additions & 7 deletions trunk/fs/ocfs2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2135,15 +2135,18 @@ 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) {
/*
* If we tried to grow an existing external value,
* ocfs2_xa_cleanuP-value_truncate() is going to
* let it stand. We have to restore its original
* value size.
*/
loc->xl_entry->xe_value_size = orig_value_size;
ocfs2_xa_cleanup_value_truncate(loc, "growing",
orig_clusters);
/*
* If we were growing an existing value,
* ocfs2_xa_cleanup_value_truncate() won't remove
* the entry. We need to restore the original value
* size.
*/
if (loc->xl_entry) {
BUG_ON(!orig_value_size);
loc->xl_entry->xe_value_size = orig_value_size;
}
mlog_errno(rc);
}
}
Expand Down

0 comments on commit 1b19775

Please sign in to comment.