]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 15:19:41 +0000 (16:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 15:19:41 +0000 (16:19 +0100)
added patches:
xfs-preserve-i_rdev-when-recycling-a-reclaimable-inode.patch

queue-4.15/series
queue-4.15/xfs-preserve-i_rdev-when-recycling-a-reclaimable-inode.patch [new file with mode: 0644]

index bcf459995de5f0adbb859e168a10b535dd36d122..fdfee5c4d11647bd50f0a6927efddcff5e640539 100644 (file)
@@ -28,3 +28,4 @@ fs-aio-use-rcu-accessors-for-kioctx_table-table.patch
 rdmavt-fix-synchronization-around-percpu_ref.patch
 irqchip-gic-v3-its-ensure-nr_ites-nr_lpis.patch
 nvme-fix-subsystem-multiple-controllers-support-check.patch
+xfs-preserve-i_rdev-when-recycling-a-reclaimable-inode.patch
diff --git a/queue-4.15/xfs-preserve-i_rdev-when-recycling-a-reclaimable-inode.patch b/queue-4.15/xfs-preserve-i_rdev-when-recycling-a-reclaimable-inode.patch
new file mode 100644 (file)
index 0000000..d1eb0bb
--- /dev/null
@@ -0,0 +1,54 @@
+From acd1d71598f7654b6d7718bcbe979992295c672a Mon Sep 17 00:00:00 2001
+From: Amir Goldstein <amir73il@gmail.com>
+Date: Fri, 26 Jan 2018 11:24:40 -0800
+Subject: xfs: preserve i_rdev when recycling a reclaimable inode
+
+From: Amir Goldstein <amir73il@gmail.com>
+
+commit acd1d71598f7654b6d7718bcbe979992295c672a upstream.
+
+Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
+value for special inodes to VFS inodes, but forgot to preserve the
+value of i_rdev when recycling a reclaimable xfs_inode.
+
+This was detected by xfstest overlay/017 with inodex=on mount option
+and xfs base fs. The test does a lookup of overlay chardev and blockdev
+right after drop caches.
+
+Overlayfs inodes hold a reference on underlying xfs inodes when mount
+option index=on is configured. If drop caches reclaim xfs inodes, before
+it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
+inode and that test hits that case quite often.
+
+When that happens, the xfs inode cache remains broken (zere i_rdev)
+until the next cycle mount or drop caches.
+
+Fixes: 66f364649d870 ("xfs: remove if_rdev")
+Signed-off-by: Amir Goldstein <amir73il@gmail.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/xfs/xfs_icache.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/fs/xfs/xfs_icache.c
++++ b/fs/xfs/xfs_icache.c
+@@ -295,6 +295,7 @@ xfs_reinit_inode(
+       uint32_t        generation = inode->i_generation;
+       uint64_t        version = inode->i_version;
+       umode_t         mode = inode->i_mode;
++      dev_t           dev = inode->i_rdev;
+       error = inode_init_always(mp->m_super, inode);
+@@ -302,6 +303,7 @@ xfs_reinit_inode(
+       inode->i_generation = generation;
+       inode->i_version = version;
+       inode->i_mode = mode;
++      inode->i_rdev = dev;
+       return error;
+ }