]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix cap bit calculation
authorSage Weil <sage@newdream.net>
Wed, 23 Apr 2008 02:22:53 +0000 (19:22 -0700)
committerSage Weil <sage@newdream.net>
Wed, 23 Apr 2008 02:22:53 +0000 (19:22 -0700)
src/mds/Locker.cc

index 620b239f74ad93497427a071bdd2f7013603b645..a1137f50448a4d28a824157cf4dcc1ae9d47f09e 100644 (file)
@@ -578,7 +578,7 @@ bool Locker::issue_caps(CInode *in)
       // do not issue _new_ bits when size|mtime is projected
       int careful = CEPH_CAP_EXCL|CEPH_CAP_WRBUFFER|CEPH_CAP_RDCACHE;
       if (sizemtime_is_projected)
-       allowed &= careful & cap->issued();   // only allow if already issued
+       allowed &= ~careful | cap->issued();   // only allow "careful" bits if already issued
 
       int before = cap->pending();
       long seq = cap->issue(cap->wanted() & allowed);