[ 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>
uint32_t nrclists,
struct referring_call_list *rclists)
{
uint32_t nrclists,
struct referring_call_list *rclists)
{
int i, j;
struct nfs4_session *session;
struct nfs4_slot_table *tbl;
int i, j;
struct nfs4_session *session;
struct nfs4_slot_table *tbl;
desc->cache_entry_index = index;
return 0;
out_eof:
desc->cache_entry_index = index;
return 0;
out_eof:
if (array->eof_index >= 0) {
status = -EBADCOOKIE;
if (*desc->dir_cookie == array->last_cookie)
if (array->eof_index >= 0) {
status = -EBADCOOKIE;
if (*desc->dir_cookie == array->last_cookie)
ent = &array->array[i];
if (!dir_emit(desc->ctx, ent->string.name, ent->string.len,
nfs_compat_user_ino64(ent->ino), ent->d_type)) {
ent = &array->array[i];
if (!dir_emit(desc->ctx, ent->string.name, ent->string.len,
nfs_compat_user_ino64(ent->ino), ent->d_type)) {
break;
}
desc->ctx->pos++;
break;
}
desc->ctx->pos++;
ctx->duped = 1;
}
if (array->eof_index >= 0)
ctx->duped = 1;
}
if (array->eof_index >= 0)
nfs_readdir_release_array(desc->page);
out:
nfs_readdir_release_array(desc->page);
out:
if (res == -EBADCOOKIE) {
res = 0;
/* This means either end of directory */
if (res == -EBADCOOKIE) {
res = 0;
/* 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 */
res = uncached_readdir(desc);
if (res == 0)
/* Or that the server has 'lost' a cookie */
res = uncached_readdir(desc);
if (res == 0)
spin_lock(&nn->nfs_client_lock);
list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) {
spin_lock(&nn->nfs_client_lock);
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;
if (!nfs4_has_session(clp))
continue;
if (!nfs4_has_session(clp))