NFS: Fix bool initialization/comparison
[ Upstream commit 6089dd0d731028531fb1148be9fd33274ff90da4 ] Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0b0223f9c3
commit
9818f3668f
3 changed files with 7 additions and 7 deletions
|
@ -368,7 +368,7 @@ static bool referring_call_exists(struct nfs_client *clp,
|
||||||
uint32_t nrclists,
|
uint32_t nrclists,
|
||||||
struct referring_call_list *rclists)
|
struct referring_call_list *rclists)
|
||||||
{
|
{
|
||||||
bool status = 0;
|
bool status = false;
|
||||||
int i, j;
|
int i, j;
|
||||||
struct nfs4_session *session;
|
struct nfs4_session *session;
|
||||||
struct nfs4_slot_table *tbl;
|
struct nfs4_slot_table *tbl;
|
||||||
|
|
10
fs/nfs/dir.c
10
fs/nfs/dir.c
|
@ -289,7 +289,7 @@ int nfs_readdir_search_for_pos(struct nfs_cache_array *array, nfs_readdir_descri
|
||||||
desc->cache_entry_index = index;
|
desc->cache_entry_index = index;
|
||||||
return 0;
|
return 0;
|
||||||
out_eof:
|
out_eof:
|
||||||
desc->eof = 1;
|
desc->eof = true;
|
||||||
return -EBADCOOKIE;
|
return -EBADCOOKIE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ int nfs_readdir_search_for_cookie(struct nfs_cache_array *array, nfs_readdir_des
|
||||||
if (array->eof_index >= 0) {
|
if (array->eof_index >= 0) {
|
||||||
status = -EBADCOOKIE;
|
status = -EBADCOOKIE;
|
||||||
if (*desc->dir_cookie == array->last_cookie)
|
if (*desc->dir_cookie == array->last_cookie)
|
||||||
desc->eof = 1;
|
desc->eof = true;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
return status;
|
return status;
|
||||||
|
@ -791,7 +791,7 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc)
|
||||||
ent = &array->array[i];
|
ent = &array->array[i];
|
||||||
if (!dir_emit(desc->ctx, ent->string.name, ent->string.len,
|
if (!dir_emit(desc->ctx, ent->string.name, ent->string.len,
|
||||||
nfs_compat_user_ino64(ent->ino), ent->d_type)) {
|
nfs_compat_user_ino64(ent->ino), ent->d_type)) {
|
||||||
desc->eof = 1;
|
desc->eof = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
desc->ctx->pos++;
|
desc->ctx->pos++;
|
||||||
|
@ -803,7 +803,7 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc)
|
||||||
ctx->duped = 1;
|
ctx->duped = 1;
|
||||||
}
|
}
|
||||||
if (array->eof_index >= 0)
|
if (array->eof_index >= 0)
|
||||||
desc->eof = 1;
|
desc->eof = true;
|
||||||
|
|
||||||
nfs_readdir_release_array(desc->page);
|
nfs_readdir_release_array(desc->page);
|
||||||
out:
|
out:
|
||||||
|
@ -905,7 +905,7 @@ static int nfs_readdir(struct file *file, struct dir_context *ctx)
|
||||||
if (res == -EBADCOOKIE) {
|
if (res == -EBADCOOKIE) {
|
||||||
res = 0;
|
res = 0;
|
||||||
/* This means either end of directory */
|
/* This means either end of directory */
|
||||||
if (*desc->dir_cookie && desc->eof == 0) {
|
if (*desc->dir_cookie && !desc->eof) {
|
||||||
/* Or that the server has 'lost' a cookie */
|
/* Or that the server has 'lost' a cookie */
|
||||||
res = uncached_readdir(desc);
|
res = uncached_readdir(desc);
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
|
|
|
@ -751,7 +751,7 @@ nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr,
|
||||||
|
|
||||||
spin_lock(&nn->nfs_client_lock);
|
spin_lock(&nn->nfs_client_lock);
|
||||||
list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) {
|
list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) {
|
||||||
if (nfs4_cb_match_client(addr, clp, minorversion) == false)
|
if (!nfs4_cb_match_client(addr, clp, minorversion))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!nfs4_has_session(clp))
|
if (!nfs4_has_session(clp))
|
||||||
|
|
Loading…
Add table
Reference in a new issue