aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-10-09 17:16:35 -0400
committerSage Weil <sage@redhat.com>2014-10-14 15:57:04 -0400
commitab6c2c3ebe1d4fddc1f9ae29810799419be950c0 (patch)
tree483cfff4c9dc46ea9090d9532baa6fff43edf47f /fs/ceph
parent25f897773ba4ddc3dd9f8eabf358cfaefb23b8ae (diff)
ceph: fix bool assignments
Fix some coccinelle warnings: fs/ceph/caps.c:2400:6-10: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2401:6-15: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2402:6-17: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2403:6-22: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2404:6-22: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2405:6-19: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2440:4-20: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2469:3-16: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2490:2-18: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2519:3-7: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2549:3-12: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2575:2-6: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2589:3-7: WARNING: Assignment of bool to 0/1 Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/caps.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index b3b0a913589f..659f2ea9e6f7 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -2397,12 +2397,12 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
2397 u64 max_size = le64_to_cpu(grant->max_size); 2397 u64 max_size = le64_to_cpu(grant->max_size);
2398 struct timespec mtime, atime, ctime; 2398 struct timespec mtime, atime, ctime;
2399 int check_caps = 0; 2399 int check_caps = 0;
2400 bool wake = 0; 2400 bool wake = false;
2401 bool writeback = 0; 2401 bool writeback = false;
2402 bool queue_trunc = 0; 2402 bool queue_trunc = false;
2403 bool queue_invalidate = 0; 2403 bool queue_invalidate = false;
2404 bool queue_revalidate = 0; 2404 bool queue_revalidate = false;
2405 bool deleted_inode = 0; 2405 bool deleted_inode = false;
2406 2406
2407 dout("handle_cap_grant inode %p cap %p mds%d seq %d %s\n", 2407 dout("handle_cap_grant inode %p cap %p mds%d seq %d %s\n",
2408 inode, cap, mds, seq, ceph_cap_string(newcaps)); 2408 inode, cap, mds, seq, ceph_cap_string(newcaps));
@@ -2437,7 +2437,7 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
2437 /* there were locked pages.. invalidate later 2437 /* there were locked pages.. invalidate later
2438 in a separate thread. */ 2438 in a separate thread. */
2439 if (ci->i_rdcache_revoking != ci->i_rdcache_gen) { 2439 if (ci->i_rdcache_revoking != ci->i_rdcache_gen) {
2440 queue_invalidate = 1; 2440 queue_invalidate = true;
2441 ci->i_rdcache_revoking = ci->i_rdcache_gen; 2441 ci->i_rdcache_revoking = ci->i_rdcache_gen;
2442 } 2442 }
2443 } 2443 }
@@ -2466,7 +2466,7 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
2466 set_nlink(inode, le32_to_cpu(grant->nlink)); 2466 set_nlink(inode, le32_to_cpu(grant->nlink));
2467 if (inode->i_nlink == 0 && 2467 if (inode->i_nlink == 0 &&
2468 (newcaps & (CEPH_CAP_LINK_SHARED | CEPH_CAP_LINK_EXCL))) 2468 (newcaps & (CEPH_CAP_LINK_SHARED | CEPH_CAP_LINK_EXCL)))
2469 deleted_inode = 1; 2469 deleted_inode = true;
2470 } 2470 }
2471 2471
2472 if ((issued & CEPH_CAP_XATTR_EXCL) == 0 && grant->xattr_len) { 2472 if ((issued & CEPH_CAP_XATTR_EXCL) == 0 && grant->xattr_len) {
@@ -2487,7 +2487,7 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
2487 /* Do we need to revalidate our fscache cookie. Don't bother on the 2487 /* Do we need to revalidate our fscache cookie. Don't bother on the
2488 * first cache cap as we already validate at cookie creation time. */ 2488 * first cache cap as we already validate at cookie creation time. */
2489 if ((issued & CEPH_CAP_FILE_CACHE) && ci->i_rdcache_gen > 1) 2489 if ((issued & CEPH_CAP_FILE_CACHE) && ci->i_rdcache_gen > 1)
2490 queue_revalidate = 1; 2490 queue_revalidate = true;
2491 2491
2492 if (newcaps & CEPH_CAP_ANY_RD) { 2492 if (newcaps & CEPH_CAP_ANY_RD) {
2493 /* ctime/mtime/atime? */ 2493 /* ctime/mtime/atime? */
@@ -2516,7 +2516,7 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
2516 ci->i_wanted_max_size = 0; /* reset */ 2516 ci->i_wanted_max_size = 0; /* reset */
2517 ci->i_requested_max_size = 0; 2517 ci->i_requested_max_size = 0;
2518 } 2518 }
2519 wake = 1; 2519 wake = true;
2520 } 2520 }
2521 } 2521 }
2522 2522
@@ -2546,7 +2546,7 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
2546 ceph_cap_string(newcaps), 2546 ceph_cap_string(newcaps),
2547 ceph_cap_string(revoking)); 2547 ceph_cap_string(revoking));
2548 if (revoking & used & CEPH_CAP_FILE_BUFFER) 2548 if (revoking & used & CEPH_CAP_FILE_BUFFER)
2549 writeback = 1; /* initiate writeback; will delay ack */ 2549 writeback = true; /* initiate writeback; will delay ack */
2550 else if (revoking == CEPH_CAP_FILE_CACHE && 2550 else if (revoking == CEPH_CAP_FILE_CACHE &&
2551 (newcaps & CEPH_CAP_FILE_LAZYIO) == 0 && 2551 (newcaps & CEPH_CAP_FILE_LAZYIO) == 0 &&
2552 queue_invalidate) 2552 queue_invalidate)
@@ -2572,7 +2572,7 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
2572 cap->implemented |= newcaps; /* add bits only, to 2572 cap->implemented |= newcaps; /* add bits only, to
2573 * avoid stepping on a 2573 * avoid stepping on a
2574 * pending revocation */ 2574 * pending revocation */
2575 wake = 1; 2575 wake = true;
2576 } 2576 }
2577 BUG_ON(cap->issued & ~cap->implemented); 2577 BUG_ON(cap->issued & ~cap->implemented);
2578 2578
@@ -2586,7 +2586,7 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
2586 kick_flushing_inode_caps(mdsc, session, inode); 2586 kick_flushing_inode_caps(mdsc, session, inode);
2587 up_read(&mdsc->snap_rwsem); 2587 up_read(&mdsc->snap_rwsem);
2588 if (newcaps & ~issued) 2588 if (newcaps & ~issued)
2589 wake = 1; 2589 wake = true;
2590 } 2590 }
2591 2591
2592 if (queue_trunc) { 2592 if (queue_trunc) {