nilfs2: use octal for unreadable permission macro
authorRyusuke Konishi <[email protected]>
Fri, 17 Nov 2017 23:29:46 +0000 (15:29 -0800)
committerLinus Torvalds <[email protected]>
Sat, 18 Nov 2017 00:10:03 +0000 (16:10 -0800)
Replace S_IRWXUGO with 0777 because symbolic permissions are considered
harmful:

 https://lwn.net/Articles/696229/

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ryusuke Konishi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/nilfs2/namei.c

index 515d13c196daf81f69dc0b5501b4b9780c8d2743..1a2894aa01942597e05dba587d33d42bd2da7c0a 100644 (file)
@@ -150,7 +150,7 @@ static int nilfs_symlink(struct inode *dir, struct dentry *dentry,
        if (err)
                return err;
 
-       inode = nilfs_new_inode(dir, S_IFLNK | S_IRWXUGO);
+       inode = nilfs_new_inode(dir, S_IFLNK | 0777);
        err = PTR_ERR(inode);
        if (IS_ERR(inode))
                goto out;