Commit 384a7cca authored by zhengbin's avatar zhengbin Committed by J. Bruce Fields

nfsd: use true,false for bool variable in vfs.c

Fixes coccicheck warning:

fs/nfsd/vfs.c:1389:5-13: WARNING: Assignment of 0/1 to bool variable
fs/nfsd/vfs.c:1398:5-13: WARNING: Assignment of 0/1 to bool variable
fs/nfsd/vfs.c:1415:2-10: WARNING: Assignment of 0/1 to bool variable
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarzhengbin <zhengbin13@huawei.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 364d5814
...@@ -1396,7 +1396,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, ...@@ -1396,7 +1396,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
&& d_inode(dchild)->i_atime.tv_sec == v_atime && d_inode(dchild)->i_atime.tv_sec == v_atime
&& d_inode(dchild)->i_size == 0 ) { && d_inode(dchild)->i_size == 0 ) {
if (created) if (created)
*created = 1; *created = true;
break; break;
} }
/* fall through */ /* fall through */
...@@ -1405,7 +1405,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, ...@@ -1405,7 +1405,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
&& d_inode(dchild)->i_atime.tv_sec == v_atime && d_inode(dchild)->i_atime.tv_sec == v_atime
&& d_inode(dchild)->i_size == 0 ) { && d_inode(dchild)->i_size == 0 ) {
if (created) if (created)
*created = 1; *created = true;
goto set_attr; goto set_attr;
} }
/* fall through */ /* fall through */
...@@ -1422,7 +1422,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, ...@@ -1422,7 +1422,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
goto out_nfserr; goto out_nfserr;
} }
if (created) if (created)
*created = 1; *created = true;
nfsd_check_ignore_resizing(iap); nfsd_check_ignore_resizing(iap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment