]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_attr.c
Merge Qualcom Hexagon architecture
[karo-tx-linux.git] / fs / xfs / xfs_attr.c
index c7dab0c0bdda3d3cd45a2317849c090c8811cbf8..1e5d97f86ea819493b9acfd1584696fc7ce5d733 100644 (file)
@@ -319,7 +319,7 @@ xfs_attr_set_int(
                return (error);
        }
 
-       xfs_trans_ijoin(args.trans, dp);
+       xfs_trans_ijoin(args.trans, dp, 0);
 
        /*
         * If the attribute list is non-existent or a shortform list,
@@ -389,7 +389,7 @@ xfs_attr_set_int(
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args.trans, dp);
+                       xfs_trans_ijoin(args.trans, dp, 0);
 
                /*
                 * Commit the leaf transformation.  We'll need another (linked)
@@ -537,7 +537,7 @@ xfs_attr_remove_int(xfs_inode_t *dp, struct xfs_name *name, int flags)
         * No need to make quota reservations here. We expect to release some
         * blocks not allocate in the common case.
         */
-       xfs_trans_ijoin(args.trans, dp);
+       xfs_trans_ijoin(args.trans, dp, 0);
 
        /*
         * Decide on what work routines to call based on the inode size.
@@ -809,7 +809,7 @@ xfs_attr_inactive(xfs_inode_t *dp)
         * No need to make quota reservations here. We expect to release some
         * blocks, not allocate, in the common case.
         */
-       xfs_trans_ijoin(trans, dp);
+       xfs_trans_ijoin(trans, dp, 0);
 
        /*
         * Decide on what work routines to call based on the inode size.
@@ -961,7 +961,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
 
                /*
                 * Commit the current trans (including the inode) and start
@@ -1063,7 +1063,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
                         * in all transactions.
                         */
                        if (committed)
-                               xfs_trans_ijoin(args->trans, dp);
+                               xfs_trans_ijoin(args->trans, dp, 0);
                } else
                        xfs_da_buf_done(bp);
 
@@ -1137,7 +1137,7 @@ xfs_attr_leaf_removename(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
        } else
                xfs_da_buf_done(bp);
        return(0);
@@ -1291,7 +1291,7 @@ restart:
                         * in all transactions.
                         */
                        if (committed)
-                               xfs_trans_ijoin(args->trans, dp);
+                               xfs_trans_ijoin(args->trans, dp, 0);
 
                        /*
                         * Commit the node conversion and start the next
@@ -1328,7 +1328,7 @@ restart:
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
        } else {
                /*
                 * Addition succeeded, update Btree hashvals.
@@ -1440,7 +1440,7 @@ restart:
                         * in all transactions.
                         */
                        if (committed)
-                               xfs_trans_ijoin(args->trans, dp);
+                               xfs_trans_ijoin(args->trans, dp, 0);
                }
 
                /*
@@ -1572,7 +1572,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
 
                /*
                 * Commit the Btree join operation and start a new trans.
@@ -1623,7 +1623,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
                         * in all transactions.
                         */
                        if (committed)
-                               xfs_trans_ijoin(args->trans, dp);
+                               xfs_trans_ijoin(args->trans, dp, 0);
                } else
                        xfs_da_brelse(args->trans, bp);
        }
@@ -1963,10 +1963,9 @@ xfs_attr_rmtval_get(xfs_da_args_t *args)
        lblkno = args->rmtblkno;
        while (valuelen > 0) {
                nmap = ATTR_RMTVALUE_MAPSIZE;
-               error = xfs_bmapi(args->trans, args->dp, (xfs_fileoff_t)lblkno,
-                                 args->rmtblkcnt,
-                                 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
-                                 NULL, 0, map, &nmap, NULL);
+               error = xfs_bmapi_read(args->dp, (xfs_fileoff_t)lblkno,
+                                      args->rmtblkcnt, map, &nmap,
+                                      XFS_BMAPI_ATTRFORK);
                if (error)
                        return(error);
                ASSERT(nmap >= 1);
@@ -2040,10 +2039,9 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
                 */
                xfs_bmap_init(args->flist, args->firstblock);
                nmap = 1;
-               error = xfs_bmapi(args->trans, dp, (xfs_fileoff_t)lblkno,
+               error = xfs_bmapi_write(args->trans, dp, (xfs_fileoff_t)lblkno,
                                  blkcnt,
-                                 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA |
-                                                       XFS_BMAPI_WRITE,
+                                 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
                                  args->firstblock, args->total, &map, &nmap,
                                  args->flist);
                if (!error) {
@@ -2062,7 +2060,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
 
                ASSERT(nmap == 1);
                ASSERT((map.br_startblock != DELAYSTARTBLOCK) &&
@@ -2092,14 +2090,11 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
                 */
                xfs_bmap_init(args->flist, args->firstblock);
                nmap = 1;
-               error = xfs_bmapi(NULL, dp, (xfs_fileoff_t)lblkno,
-                                 args->rmtblkcnt,
-                                 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
-                                 args->firstblock, 0, &map, &nmap,
-                                 NULL);
-               if (error) {
+               error = xfs_bmapi_read(dp, (xfs_fileoff_t)lblkno,
+                                      args->rmtblkcnt, &map, &nmap,
+                                      XFS_BMAPI_ATTRFORK);
+               if (error)
                        return(error);
-               }
                ASSERT(nmap == 1);
                ASSERT((map.br_startblock != DELAYSTARTBLOCK) &&
                       (map.br_startblock != HOLESTARTBLOCK));
@@ -2155,16 +2150,12 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
                /*
                 * Try to remember where we decided to put the value.
                 */
-               xfs_bmap_init(args->flist, args->firstblock);
                nmap = 1;
-               error = xfs_bmapi(NULL, args->dp, (xfs_fileoff_t)lblkno,
-                                       args->rmtblkcnt,
-                                       XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
-                                       args->firstblock, 0, &map, &nmap,
-                                       args->flist);
-               if (error) {
+               error = xfs_bmapi_read(args->dp, (xfs_fileoff_t)lblkno,
+                                      args->rmtblkcnt, &map, &nmap,
+                                      XFS_BMAPI_ATTRFORK);
+               if (error)
                        return(error);
-               }
                ASSERT(nmap == 1);
                ASSERT((map.br_startblock != DELAYSTARTBLOCK) &&
                       (map.br_startblock != HOLESTARTBLOCK));
@@ -2177,8 +2168,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
                 */
                bp = xfs_incore(mp->m_ddev_targp, dblkno, blkcnt, XBF_TRYLOCK);
                if (bp) {
-                       XFS_BUF_STALE(bp);
-                       xfs_buf_delwri_dequeue(bp);
+                       xfs_buf_stale(bp);
                        xfs_buf_relse(bp);
                        bp = NULL;
                }
@@ -2216,7 +2206,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, args->dp);
+                       xfs_trans_ijoin(args->trans, args->dp, 0);
 
                /*
                 * Close out trans and start the next one in the chain.