On 2020/01/21 15:22, Dan Carpenter wrote: > Hello Damien Le Moal, > > The patch 5bba4a0d475a: "fs: New zonefs file system" from Dec 25, > 2019, leads to the following static checker warning: > > fs/zonefs/super.c:218 zonefs_inode_setattr() > error: should you be using S_ISDIR() Yes, that would be better. I fixed it. I also caught another warning with make C=1 W=1 for a set but not used variable. Fixed that one too. Sending a v8. > > fs/zonefs/super.c > 208 static int zonefs_inode_setattr(struct dentry *dentry, struct iattr *iattr) > 209 { > 210 struct inode *inode = d_inode(dentry); > 211 int ret; > 212 > 213 ret = setattr_prepare(dentry, iattr); > 214 if (ret) > 215 return ret; > 216 > 217 /* Files and sub-directories cannot be created or deleted */ > 218 if ((iattr->ia_valid & ATTR_MODE) && (inode->i_mode & S_IFDIR) && > ^^^^^^^^^^^^^^^^^^^^^^^ > TBH, I don't know what the rules are with these. > > 219 (iattr->ia_mode & 0222)) > 220 return -EPERM; > 221 > 222 if (((iattr->ia_valid & ATTR_UID) && > 223 !uid_eq(iattr->ia_uid, inode->i_uid)) || > 224 ((iattr->ia_valid & ATTR_GID) && > 225 !gid_eq(iattr->ia_gid, inode->i_gid))) { > 226 ret = dquot_transfer(inode, iattr); > > regards, > dan carpenter > -- Damien Le Moal Western Digital Research