Re: [PATCH] ceph: Fix bool initialization/comparison

2017-10-08 Thread Yan, Zheng


> On 7 Oct 2017, at 22:02, Thomas Meyer  wrote:
> 
> Bool initializations should use true and false. Bool tests don't need
> comparisons.
> 
> Signed-off-by: Thomas Meyer 
> ---
> 
> diff -u -p a/fs/ceph/caps.c b/fs/ceph/caps.c
> --- a/fs/ceph/caps.c
> +++ b/fs/ceph/caps.c
> @@ -1711,7 +1711,7 @@ void ceph_check_caps(struct ceph_inode_i
> 
>   /* if we are unmounting, flush any unused caps immediately. */
>   if (mdsc->stopping)
> - is_delayed = 1;
> + is_delayed = true;
> 
>   spin_lock(>i_ceph_lock);
> 
> @@ -3185,8 +3185,8 @@ static void handle_cap_flush_ack(struct
>   int dirty = le32_to_cpu(m->dirty);
>   int cleaned = 0;
>   bool drop = false;
> - bool wake_ci = 0;
> - bool wake_mdsc = 0;
> + bool wake_ci = false;
> + bool wake_mdsc = false;
> 
>   list_for_each_entry_safe(cf, tmp_cf, >i_cap_flush_list, i_list) {
>   if (cf->tid == flush_tid)

Applied, thanks

Yan, Zheng




Re: [PATCH] ceph: Fix bool initialization/comparison

2017-10-08 Thread Yan, Zheng


> On 7 Oct 2017, at 22:02, Thomas Meyer  wrote:
> 
> Bool initializations should use true and false. Bool tests don't need
> comparisons.
> 
> Signed-off-by: Thomas Meyer 
> ---
> 
> diff -u -p a/fs/ceph/caps.c b/fs/ceph/caps.c
> --- a/fs/ceph/caps.c
> +++ b/fs/ceph/caps.c
> @@ -1711,7 +1711,7 @@ void ceph_check_caps(struct ceph_inode_i
> 
>   /* if we are unmounting, flush any unused caps immediately. */
>   if (mdsc->stopping)
> - is_delayed = 1;
> + is_delayed = true;
> 
>   spin_lock(>i_ceph_lock);
> 
> @@ -3185,8 +3185,8 @@ static void handle_cap_flush_ack(struct
>   int dirty = le32_to_cpu(m->dirty);
>   int cleaned = 0;
>   bool drop = false;
> - bool wake_ci = 0;
> - bool wake_mdsc = 0;
> + bool wake_ci = false;
> + bool wake_mdsc = false;
> 
>   list_for_each_entry_safe(cf, tmp_cf, >i_cap_flush_list, i_list) {
>   if (cf->tid == flush_tid)

Applied, thanks

Yan, Zheng




[PATCH] ceph: Fix bool initialization/comparison

2017-10-07 Thread Thomas Meyer
Bool initializations should use true and false. Bool tests don't need
comparisons.

Signed-off-by: Thomas Meyer 
---

diff -u -p a/fs/ceph/caps.c b/fs/ceph/caps.c
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1711,7 +1711,7 @@ void ceph_check_caps(struct ceph_inode_i
 
/* if we are unmounting, flush any unused caps immediately. */
if (mdsc->stopping)
-   is_delayed = 1;
+   is_delayed = true;
 
spin_lock(>i_ceph_lock);
 
@@ -3185,8 +3185,8 @@ static void handle_cap_flush_ack(struct
int dirty = le32_to_cpu(m->dirty);
int cleaned = 0;
bool drop = false;
-   bool wake_ci = 0;
-   bool wake_mdsc = 0;
+   bool wake_ci = false;
+   bool wake_mdsc = false;
 
list_for_each_entry_safe(cf, tmp_cf, >i_cap_flush_list, i_list) {
if (cf->tid == flush_tid)


[PATCH] ceph: Fix bool initialization/comparison

2017-10-07 Thread Thomas Meyer
Bool initializations should use true and false. Bool tests don't need
comparisons.

Signed-off-by: Thomas Meyer 
---

diff -u -p a/fs/ceph/caps.c b/fs/ceph/caps.c
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1711,7 +1711,7 @@ void ceph_check_caps(struct ceph_inode_i
 
/* if we are unmounting, flush any unused caps immediately. */
if (mdsc->stopping)
-   is_delayed = 1;
+   is_delayed = true;
 
spin_lock(>i_ceph_lock);
 
@@ -3185,8 +3185,8 @@ static void handle_cap_flush_ack(struct
int dirty = le32_to_cpu(m->dirty);
int cleaned = 0;
bool drop = false;
-   bool wake_ci = 0;
-   bool wake_mdsc = 0;
+   bool wake_ci = false;
+   bool wake_mdsc = false;
 
list_for_each_entry_safe(cf, tmp_cf, >i_cap_flush_list, i_list) {
if (cf->tid == flush_tid)