diff options
Diffstat (limited to 'fs/xfs/xfs_attr.c')
-rw-r--r-- | fs/xfs/xfs_attr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index 5e5dbe62b194..557dad611de0 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
@@ -241,8 +241,7 @@ xfs_attr_set_int(xfs_inode_t *dp, struct xfs_name *name, | |||
241 | args.firstblock = &firstblock; | 241 | args.firstblock = &firstblock; |
242 | args.flist = &flist; | 242 | args.flist = &flist; |
243 | args.whichfork = XFS_ATTR_FORK; | 243 | args.whichfork = XFS_ATTR_FORK; |
244 | args.addname = 1; | 244 | args.op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT; |
245 | args.oknoent = 1; | ||
246 | 245 | ||
247 | /* | 246 | /* |
248 | * Determine space new attribute will use, and if it would be | 247 | * Determine space new attribute will use, and if it would be |
@@ -974,7 +973,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args) | |||
974 | xfs_da_brelse(args->trans, bp); | 973 | xfs_da_brelse(args->trans, bp); |
975 | return(retval); | 974 | return(retval); |
976 | } | 975 | } |
977 | args->rename = 1; /* an atomic rename */ | 976 | args->op_flags |= XFS_DA_OP_RENAME; /* an atomic rename */ |
978 | args->blkno2 = args->blkno; /* set 2nd entry info*/ | 977 | args->blkno2 = args->blkno; /* set 2nd entry info*/ |
979 | args->index2 = args->index; | 978 | args->index2 = args->index; |
980 | args->rmtblkno2 = args->rmtblkno; | 979 | args->rmtblkno2 = args->rmtblkno; |
@@ -1054,7 +1053,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args) | |||
1054 | * so that one disappears and one appears atomically. Then we | 1053 | * so that one disappears and one appears atomically. Then we |
1055 | * must remove the "old" attribute/value pair. | 1054 | * must remove the "old" attribute/value pair. |
1056 | */ | 1055 | */ |
1057 | if (args->rename) { | 1056 | if (args->op_flags & XFS_DA_OP_RENAME) { |
1058 | /* | 1057 | /* |
1059 | * In a separate transaction, set the incomplete flag on the | 1058 | * In a separate transaction, set the incomplete flag on the |
1060 | * "old" attr and clear the incomplete flag on the "new" attr. | 1059 | * "old" attr and clear the incomplete flag on the "new" attr. |
@@ -1307,7 +1306,7 @@ restart: | |||
1307 | } else if (retval == EEXIST) { | 1306 | } else if (retval == EEXIST) { |
1308 | if (args->flags & ATTR_CREATE) | 1307 | if (args->flags & ATTR_CREATE) |
1309 | goto out; | 1308 | goto out; |
1310 | args->rename = 1; /* atomic rename op */ | 1309 | args->op_flags |= XFS_DA_OP_RENAME; /* atomic rename op */ |
1311 | args->blkno2 = args->blkno; /* set 2nd entry info*/ | 1310 | args->blkno2 = args->blkno; /* set 2nd entry info*/ |
1312 | args->index2 = args->index; | 1311 | args->index2 = args->index; |
1313 | args->rmtblkno2 = args->rmtblkno; | 1312 | args->rmtblkno2 = args->rmtblkno; |
@@ -1425,7 +1424,7 @@ restart: | |||
1425 | * so that one disappears and one appears atomically. Then we | 1424 | * so that one disappears and one appears atomically. Then we |
1426 | * must remove the "old" attribute/value pair. | 1425 | * must remove the "old" attribute/value pair. |
1427 | */ | 1426 | */ |
1428 | if (args->rename) { | 1427 | if (args->op_flags & XFS_DA_OP_RENAME) { |
1429 | /* | 1428 | /* |
1430 | * In a separate transaction, set the incomplete flag on the | 1429 | * In a separate transaction, set the incomplete flag on the |
1431 | * "old" attr and clear the incomplete flag on the "new" attr. | 1430 | * "old" attr and clear the incomplete flag on the "new" attr. |