kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: Orangefs: kernel client part 2
@ 2015-07-27 15:45 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-07-27 15:45 UTC (permalink / raw)
  To: kernel-janitors

Hello Mike Marshall,

The patch ac6163f8a3f3: "Orangefs: kernel client part 2" from Jul 17,
2015, leads to the following static checker warning:

	fs/orangefs/dir.c:256 pvfs2_readdir()
	warn: bool is not less than zero.

fs/orangefs/dir.c
   249          if (pos = 0) {
   250                  ino = get_ino_from_khandle(dentry->d_inode);
   251                  gossip_debug(GOSSIP_DIR_DEBUG,
   252                               "%s: calling dir_emit of \".\" with pos = %llu\n",
   253                               __func__,
   254                               llu(pos));
   255                  ret = dir_emit(ctx, ".", 1, ino, DT_DIR);
   256                  if (ret < 0)
                            ^^^^^^^
Most callers don't check for negative here.  I have no idea about fs/
though so I'm not sure what was intended.

   257                          goto out_destroy_handle;
   258                  ctx->pos++;
   259                  gossip_ldebug(GOSSIP_DIR_DEBUG,
   260                                "%s: ctx->pos:%lld\n",
   261                                __func__,
   262                                lld(ctx->pos));
   263                  pos++;
   264          }


regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-27 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 15:45 Orangefs: kernel client part 2 Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).