]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: xfs_iflush_cluster fails to abort on error
authorDave Chinner <dchinner@redhat.com>
Wed, 18 May 2016 03:53:42 +0000 (13:53 +1000)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:21:54 +0000 (17:21 -0500)
commit6b46230715056de6a63d16f37e713d03055f044d
treeb2f0ea7127f8975ec121be0a80007432e8fb44a6
parenta757b5df76f22ff8442cf94a23ee794d17239abb
xfs: xfs_iflush_cluster fails to abort on error

Orabug: 25256934

[ Upstream commit b1438f477934f5a4d5a44df26f3079a7575d5946 ]

When a failure due to an inode buffer occurs, the error handling
fails to abort the inode writeback correctly. This can result in the
inode being reclaimed whilst still in the AIL, leading to
use-after-free situations as well as filesystems that cannot be
unmounted as the inode log items left in the AIL never get removed.

Fix this by ensuring fatal errors from xfs_imap_to_bp() result in
the inode flush being aborted correctly.

cc: <stable@vger.kernel.org> # 3.10.x-
Reported-by: Shyam Kaushik <shyam@zadarastorage.com>
Diagnosed-by: Shyam Kaushik <shyam@zadarastorage.com>
Tested-by: Shyam Kaushik <shyam@zadarastorage.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 6659d79405e4c4ec1abac74aaf551fb822081112)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
fs/xfs/xfs_inode.c