diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 2aef3c36a150..cce3a7bb95e9 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -663,7 +663,7 @@ int hfs_inode_setattr(struct mnt_idmap *idmap, struct dentry *dentry, ((S_ISDIR(inode->i_mode) && (attr->ia_mode != inode->i_mode)) || (attr->ia_mode & ~HFS_VALID_MODE_BITS)))) { - return hsb->s_quiet ? 0 : error; + return hsb->s_quiet ? 0 : -EPERM; } /* map file permissions to the closest allowable permissions in HFS */