]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: considered _held_ caps when deciding what to ignore in fill_inode
authorSage Weil <sage@newdream.net>
Sun, 18 Jan 2009 02:11:48 +0000 (18:11 -0800)
committerSage Weil <sage@newdream.net>
Sun, 18 Jan 2009 02:11:48 +0000 (18:11 -0800)
If EXCL is being revoked, we still "hold" it and should ignore inode values
provided by the MDS in fill_inode.

src/kernel/inode.c

index 646d7ba5d9b1d058a0c19951ea7c8fd4956972f5..85748deeee74f18a798fff90bd9927ef20c3ee9d 100644 (file)
@@ -393,7 +393,7 @@ static int fill_inode(struct inode *inode,
        struct ceph_mds_reply_inode *info = iinfo->in;
        struct ceph_inode_info *ci = ceph_inode(inode);
        int i;
-       int issued;
+       int issued, implemented;
        struct timespec mtime, atime, ctime;
        u32 nsplits;
        void *xattr_data = NULL;
@@ -427,7 +427,8 @@ static int fill_inode(struct inode *inode,
            (ci->i_version & ~1) > le64_to_cpu(info->version))
                goto no_change;
 
-       issued = __ceph_caps_issued(ci, NULL);
+       issued = __ceph_caps_issued(ci, &implemented);
+       issued |= implemented;
 
        /* update inode */
        ci->i_version = le64_to_cpu(info->version);