Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20b83944 authored by Dave Chinner's avatar Dave Chinner
Browse files

Merge branch 'xfs-misc-fixes-for-4.3' into for-next

parents df150ed1 1cfc4a9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ xfs-y += $(addprefix libxfs/, \
				   xfs_attr.o \
				   xfs_attr_leaf.o \
				   xfs_attr_remote.o \
				   xfs_bit.o \
				   xfs_bmap.o \
				   xfs_bmap_btree.o \
				   xfs_btree.o \
@@ -63,7 +64,6 @@ xfs-$(CONFIG_XFS_RT) += $(addprefix libxfs/, \
xfs-y				+= xfs_aops.o \
				   xfs_attr_inactive.o \
				   xfs_attr_list.o \
				   xfs_bit.o \
				   xfs_bmap_util.o \
				   xfs_buf.o \
				   xfs_dir2_readdir.o \
+2 −3
Original line number Diff line number Diff line
@@ -618,9 +618,8 @@ xfs_attr_rmtval_remove(

		xfs_bmap_init(args->flist, args->firstblock);
		error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
				    XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
				    1, args->firstblock, args->flist,
				    &done);
				    XFS_BMAPI_ATTRFORK, 1, args->firstblock,
				    args->flist, &done);
		if (!error) {
			error = xfs_bmap_finish(&args->trans, args->flist,
						&committed);
+0 −0

File moved.

+2 −2
Original line number Diff line number Diff line
@@ -2351,8 +2351,8 @@ xfs_da_shrink_inode(
		 * the last block to the place we want to kill.
		 */
		error = xfs_bunmapi(tp, dp, dead_blkno, count,
				    xfs_bmapi_aflag(w)|XFS_BMAPI_METADATA,
				    0, args->firstblock, args->flist, &done);
				    xfs_bmapi_aflag(w), 0, args->firstblock,
				    args->flist, &done);
		if (error == -ENOSPC) {
			if (w != XFS_DATA_FORK)
				break;
+15 −18
Original line number Diff line number Diff line
@@ -674,25 +674,22 @@ xfs_dir2_shrink_inode(
	mp = dp->i_mount;
	tp = args->trans;
	da = xfs_dir2_db_to_da(args->geo, db);

	/* Unmap the fsblock(s). */
	error = xfs_bunmapi(tp, dp, da, args->geo->fsbcount, 0, 0,
			    args->firstblock, args->flist, &done);
	if (error) {
		/*
	 * Unmap the fsblock(s).
	 */
	if ((error = xfs_bunmapi(tp, dp, da, args->geo->fsbcount,
			XFS_BMAPI_METADATA, 0, args->firstblock, args->flist,
			&done))) {
		/*
		 * ENOSPC actually can happen if we're in a removename with
		 * no space reservation, and the resulting block removal
		 * would cause a bmap btree split or conversion from extents
		 * to btree.  This can only happen for un-fragmented
		 * directory blocks, since you need to be punching out
		 * the middle of an extent.
		 * In this case we need to leave the block in the file,
		 * and not binval it.
		 * So the block has to be in a consistent empty state
		 * and appropriately logged.
		 * We don't free up the buffer, the caller can tell it
		 * hasn't happened since it got an error back.
		 * ENOSPC actually can happen if we're in a removename with no
		 * space reservation, and the resulting block removal would
		 * cause a bmap btree split or conversion from extents to btree.
		 * This can only happen for un-fragmented directory blocks,
		 * since you need to be punching out the middle of an extent.
		 * In this case we need to leave the block in the file, and not
		 * binval it.  So the block has to be in a consistent empty
		 * state and appropriately logged.  We don't free up the buffer,
		 * the caller can tell it hasn't happened since it got an error
		 * back.
		 */
		return error;
	}
Loading