Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1738688 > unrolled thread

[PATCH review for 4.9 33/50] ceph: don't update_dentry_lease unless we actually got one

Started by"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
First post2017-09-25 03:40 +0200
Last post2017-09-25 03:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH review for 4.9 33/50] ceph: don't update_dentry_lease unless  we actually got one "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-09-25 03:40 +0200

#1738688 — [PATCH review for 4.9 33/50] ceph: don't update_dentry_lease unless we actually got one

From"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
Date2017-09-25 03:40 +0200
Subject[PATCH review for 4.9 33/50] ceph: don't update_dentry_lease unless we actually got one
Message-ID<utqxk-7O2-11@gated-at.bofh.it>
From: Jeff Layton <jlayton@redhat.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@redhat.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web