Home Home > GIT Browse > SLE12-SP3-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <ohering@suse.de>2019-04-24 18:59:38 +0200
committerOlaf Hering <ohering@suse.de>2019-04-24 18:59:38 +0200
commit9011873f20905a01545cf28448b1bc7c91489c12 (patch)
tree98542e261cae05fb07bf14d3a3acc2bff0c59298
parentec976bbdd9d2fb845eb14085ea886b0aef44192d (diff)
parenta7b734fe8735cff77cec242dc868885891c2f4bd (diff)
Merge remote-tracking branch 'kerncvs/SLE12-SP3' into SLE12-SP3-AZURESLE12-SP3-AZURE
-rw-r--r--patches.fixes/NFS-Fix-dentry-revalidation-on-NFSv4-lookup.patch65
-rw-r--r--patches.suse/floppy-check_events-callback-should-not-return-a-neg.patch36
-rw-r--r--series.conf2
3 files changed, 103 insertions, 0 deletions
diff --git a/patches.fixes/NFS-Fix-dentry-revalidation-on-NFSv4-lookup.patch b/patches.fixes/NFS-Fix-dentry-revalidation-on-NFSv4-lookup.patch
new file mode 100644
index 0000000000..8a45ce5ca3
--- /dev/null
+++ b/patches.fixes/NFS-Fix-dentry-revalidation-on-NFSv4-lookup.patch
@@ -0,0 +1,65 @@
+From: Trond Myklebust <trond.myklebust@hammerspace.com>
+Date: Thu, 27 Sep 2018 17:12:33 -0400
+Subject: [PATCH] NFS: Fix dentry revalidation on NFSv4 lookup
+Git-commit: be189f7e7f03de35887e5a85ddcf39b91b5d7fc1
+Patch-mainline: v4.20
+References: bsc#1132618
+
+We need to ensure that inode and dentry revalidation occurs correctly
+on reopen of a file that is already open. Currently, we can end up
+not revalidating either in the case of NFSv4.0, due to the 'cached open'
+path.
+Let's fix that by ensuring that we only do cached open for the special
+cases of open recovery and delegation return.
+
+Reported-by: Stan Hu <stanhu@gmail.com>
+Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
+Acked-by: NeilBrown <neilb@suse.com>
+
+---
+ fs/nfs/nfs4proc.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -1211,12 +1211,20 @@ static bool nfs4_mode_match_open_stateid
+ return false;
+ }
+
+-static int can_open_cached(struct nfs4_state *state, fmode_t mode, int open_mode)
++static int can_open_cached(struct nfs4_state *state, fmode_t mode,
++ int open_mode, enum open_claim_type4 claim)
+ {
+ int ret = 0;
+
+ if (open_mode & (O_EXCL|O_TRUNC))
+ goto out;
++ switch (claim) {
++ case NFS4_OPEN_CLAIM_NULL:
++ case NFS4_OPEN_CLAIM_FH:
++ goto out;
++ default:
++ break;
++ }
+ switch (mode & (FMODE_READ|FMODE_WRITE)) {
+ case FMODE_READ:
+ ret |= test_bit(NFS_O_RDONLY_STATE, &state->flags) != 0
+@@ -1481,7 +1489,7 @@ static struct nfs4_state *nfs4_try_open_
+
+ for (;;) {
+ spin_lock(&state->owner->so_lock);
+- if (can_open_cached(state, fmode, open_mode)) {
++ if (can_open_cached(state, fmode, open_mode, claim)) {
+ update_open_stateflags(state, fmode);
+ spin_unlock(&state->owner->so_lock);
+ goto out_return_state;
+@@ -1976,7 +1984,8 @@ static void nfs4_open_prepare(struct rpc
+ if (data->state != NULL) {
+ struct nfs_delegation *delegation;
+
+- if (can_open_cached(data->state, data->o_arg.fmode, data->o_arg.open_flags))
++ if (can_open_cached(data->state, data->o_arg.fmode,
++ data->o_arg.open_flags, claim))
+ goto out_no_action;
+ rcu_read_lock();
+ delegation = rcu_dereference(NFS_I(data->state->inode)->delegation);
diff --git a/patches.suse/floppy-check_events-callback-should-not-return-a-neg.patch b/patches.suse/floppy-check_events-callback-should-not-return-a-neg.patch
new file mode 100644
index 0000000000..6b1b769943
--- /dev/null
+++ b/patches.suse/floppy-check_events-callback-should-not-return-a-neg.patch
@@ -0,0 +1,36 @@
+From: Yufen Yu <yuyufen@huawei.com>
+Date: Tue, 29 Jan 2019 16:34:04 +0800
+Subject: floppy: check_events callback should not return a negative number
+Git-commit: 96d7cb932e826219ec41ac02e5af037ffae6098c
+Patch-mainline: v5.0-rc7
+References: git-fixes
+
+floppy_check_events() is supposed to return bit flags to say which
+events occured. We should return zero to say that no event flags are
+set. Only BIT(0) and BIT(1) are used in the caller. And .check_events
+interface also expect to return an unsigned int value.
+
+However, after commit a0c80efe5956, it may return -EINTR (-4u).
+Here, both BIT(0) and BIT(1) are cleared. So this patch shouldn't
+affect runtime, but it obviously is still worth fixing.
+
+Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
+Fixes: a0c80efe5956 ("floppy: fix lock_fdc() signal handling")
+Signed-off-by: Yufen Yu <yuyufen@huawei.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/block/floppy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/block/floppy.c
++++ b/drivers/block/floppy.c
+@@ -3755,7 +3755,7 @@ static unsigned int floppy_check_events(
+
+ if (time_after(jiffies, UDRS->last_checked + UDP->checkfreq)) {
+ if (lock_fdc(drive))
+- return -EINTR;
++ return 0;
+ poll_drive(false, 0);
+ process_fd_request();
+ }
diff --git a/series.conf b/series.conf
index 4559b4f418..10ef9df0b9 100644
--- a/series.conf
+++ b/series.conf
@@ -24932,6 +24932,7 @@
patches.suse/uio-make-symbol-uio_class_registered-static.patch
patches.drivers/iommu-arm-smmu-ensure-that-page-table-updates-are-visible-before-tlbi
patches.fixes/0001-xen-blkfront-avoid-NULL-blkfront_info-dereference-on.patch
+ patches.fixes/NFS-Fix-dentry-revalidation-on-NFSv4-lookup.patch
patches.fixes/xprtrdma-Reset-credit-grant-properly-after-a-disconn.patch
patches.arch/powerpc-powernv-Don-t-select-the-cpufreq-governors.patch
patches.arch/powerpc-pseries-mm-Introducing-FW_FEATURE_BLOCK_REMO.patch
@@ -25074,6 +25075,7 @@
patches.drivers/net-ena-update-driver-version-from-2.0.2-to-2.0.3.patch
patches.fixes/0003-drm-i915-Block-fbdev-HPD-processing-during-suspend.patch
patches.fixes/0004-drm-i915-Prevent-a-race-during-I915_GEM_MMAP-ioctl-w.patch
+ patches.suse/floppy-check_events-callback-should-not-return-a-neg.patch
patches.fixes/md-raid1-don-t-clear-bitmap-bits-on-interrupted-reco.patch
patches.suse/0001-net-dsa-bcm_sf2-Do-not-assume-DSA-master-supports-Wo.patch
patches.suse/mm-memory_hotplug-fix-off-by-one-in-is_pageblock_rem.patch