From 8dd782f896b7727fb71e67ca033d62c9c9f20bf3 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 7 Apr 2009 15:45:07 -0700 Subject: [PATCH] kclient: don't alter mds_wanted caps if dropping caps --- src/kernel/caps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kernel/caps.c b/src/kernel/caps.c index 13875a73f17d6..73e026b6724c2 100644 --- a/src/kernel/caps.c +++ b/src/kernel/caps.c @@ -1005,7 +1005,7 @@ retry_locked: used = __ceph_caps_used(ci); want = file_wanted | used; - + retain = want | CEPH_CAP_PIN; if (!mdsc->stopping && inode->i_nlink > 0) { retain |= CEPH_CAP_EXPIREABLE | CEPH_CAP_ANY_RD; @@ -1104,6 +1104,9 @@ retry_locked: cap->mds_wanted == want) continue; /* nothing extra, wanted is correct */ + if (drop) + want = cap->mds_wanted; /* don't update mds wanted on drop */ + /* delay cap release for a bit? */ if (!is_delayed && time_before(jiffies, ci->i_hold_caps_until)) { -- 2.39.5