ceph: fix wrong check in ceph_renew_caps()
authorYan, Zheng <zyan@redhat.com>
Sat, 25 Mar 2017 09:28:10 +0000 (17:28 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 4 May 2017 07:19:19 +0000 (09:19 +0200)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/file.c

index 26cc95421cca6e62ef10bfd32b18cf1e526b7c51..ab4823e3e0d50df28e5a6425c84b8aa2027b4b2d 100644 (file)
@@ -192,7 +192,7 @@ int ceph_renew_caps(struct inode *inode)
        spin_lock(&ci->i_ceph_lock);
        wanted = __ceph_caps_file_wanted(ci);
        if (__ceph_is_any_real_caps(ci) &&
-           (!(wanted & CEPH_CAP_ANY_WR) == 0 || ci->i_auth_cap)) {
+           (!(wanted & CEPH_CAP_ANY_WR) || ci->i_auth_cap)) {
                int issued = __ceph_caps_issued(ci, NULL);
                spin_unlock(&ci->i_ceph_lock);
                dout("renew caps %p want %s issued %s updating mds_wanted\n",