Dan,

Thanks. I think you are right and have changed this.

-- Martin

On 2/5/16, Dan Carpenter <dan.carpen...@oracle.com> wrote:
> Hello Martin Brandenburg,
>
> The patch 99109822f5cb: "orangefs: Fix revalidate." from Jan 28,
> 2016, leads to the following static checker warning:
>
>     fs/orangefs/orangefs-utils.c:431 compare_attributes_to_inode()
>         error: should you be using something like S_ISREG() here?
>     fs/orangefs/orangefs-utils.c:435 compare_attributes_to_inode()
>         error: should you be using something like S_ISREG() here?
>     fs/orangefs/orangefs-utils.c:441 compare_attributes_to_inode()
>         error: should you be using something like S_ISREG() here?
>
> fs/orangefs/orangefs-utils.c
>    428
>    429          switch (attrs->objtype) {
>    430          case ORANGEFS_TYPE_METAFILE:
>    431                  if (!(inode->i_mode & S_IFREG))
>
> The answer is, yes, almost certainly but I forget the details.
>
>    432                          return 0;
>    433                  break;
>    434          case ORANGEFS_TYPE_DIRECTORY:
>    435                  if (!(inode->i_mode & S_IFDIR))
>    436                          return 0;
>    437                  if (inode->i_nlink != 1)
>    438                          return 0;
>    439                  break;
>    440          case ORANGEFS_TYPE_SYMLINK:
>    441                  if (!(inode->i_mode & S_IFLNK))
>    442                          return 0;
>    443                  if (orangefs_inode && symname &&
>    444                      mask & ORANGEFS_ATTR_SYS_LNK_TARGET)
>    445                          if (strcmp(orangefs_inode->link_target,
> symname))
>    446                                  return 0;
>    447                  break;
>
> regards,
> dan carpenter
>
_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to