]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: don't alter mds_wanted caps if dropping caps
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 7 Apr 2009 22:45:07 +0000 (15:45 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 7 Apr 2009 23:29:33 +0000 (16:29 -0700)
src/kernel/caps.c

index 13875a73f17d619be9c91adcf93138670330e9e8..73e026b6724c261349e26b67c3d41d2897845c3b 100644 (file)
@@ -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)) {