re: Orangefs: kernel client part 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux