* Patch "xfs: fix incorrect extent state in xfs_bmap_add_extent_unwritten_real" has been added to the 4.4-stable tree
@ 2017-12-18 13:56 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-18 13:56 UTC (permalink / raw)
To: hch, alexander.levin, bfoster, darrick.wong, gregkh
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
xfs: fix incorrect extent state in xfs_bmap_add_extent_unwritten_real
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
xfs-fix-incorrect-extent-state-in-xfs_bmap_add_extent_unwritten_real.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 14:47:43 CET 2017
From: Christoph Hellwig <hch@lst.de>
Date: Tue, 17 Oct 2017 14:16:19 -0700
Subject: xfs: fix incorrect extent state in xfs_bmap_add_extent_unwritten_real
From: Christoph Hellwig <hch@lst.de>
[ Upstream commit 5e422f5e4fd71d18bc6b851eeb3864477b3d842e ]
There was one spot in xfs_bmap_add_extent_unwritten_real that didn't use the
passed in new extent state but always converted to normal, leading to wrong
behavior when converting from normal to unwritten.
Only found by code inspection, it seems like this code path to move partial
extent from written to unwritten while merging it with the next extent is
rarely exercised.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/xfs/libxfs/xfs_bmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -2670,7 +2670,7 @@ xfs_bmap_add_extent_unwritten_real(
&i)))
goto done;
XFS_WANT_CORRUPTED_GOTO(mp, i == 0, done);
- cur->bc_rec.b.br_state = XFS_EXT_NORM;
+ cur->bc_rec.b.br_state = new->br_state;
if ((error = xfs_btree_insert(cur, &i)))
goto done;
XFS_WANT_CORRUPTED_GOTO(mp, i == 1, done);
Patches currently in stable-queue which might be from hch@lst.de are
queue-4.4/xfs-fix-incorrect-extent-state-in-xfs_bmap_add_extent_unwritten_real.patch
queue-4.4/target-iscsi-fix-a-race-condition-in-iscsit_add_reject_from_cmd.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-18 13:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-18 13:56 Patch "xfs: fix incorrect extent state in xfs_bmap_add_extent_unwritten_real" has been added to the 4.4-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).