[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171011004512.7949-34-alexander.levin@verizon.com>
Date: Wed, 11 Oct 2017 00:45:27 +0000
From: "Levin, Alexander (Sasha Levin)" <alexander.levin@...izon.com>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: [GIT PULL for-4.9 33/48] ceph: don't update_dentry_lease unless we
actually got one
From: Jeff Layton <jlayton@...hat.com>
[ Upstream commit 80d025ffede88969f6adf7266fbdedfd5641148a ]
This if block updates the dentry lease even in the case where
the MDS didn't grant one.
Signed-off-by: Jeff Layton <jlayton@...hat.com>
Reviewed-by: Yan, Zheng <zyan@...hat.com>
Signed-off-by: Ilya Dryomov <idryomov@...il.com>
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
---
fs/ceph/inode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 953275b651bc..4a6df2ce0f76 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1323,8 +1323,8 @@ retry_lookup:
ceph_dir_clear_ordered(dir);
dout("d_delete %p\n", dn);
d_delete(dn);
- } else {
- if (have_lease && d_unhashed(dn))
+ } else if (have_lease) {
+ if (d_unhashed(dn))
d_add(dn, NULL);
update_dentry_lease(dn, rinfo->dlease,
session,
--
2.11.0
Powered by blists - more mailing lists