udf: use octal for permissions
According to commit f90774e1fd
("checkpatch: look for symbolic
permissions and suggest octal instead")
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
139c279fb9
commit
6ff6b2b329
|
@ -1535,7 +1535,7 @@ static int udf_read_inode(struct inode *inode, bool hidden_inode)
|
||||||
inode->i_data.a_ops = &udf_symlink_aops;
|
inode->i_data.a_ops = &udf_symlink_aops;
|
||||||
inode->i_op = &udf_symlink_inode_operations;
|
inode->i_op = &udf_symlink_inode_operations;
|
||||||
inode_nohighmem(inode);
|
inode_nohighmem(inode);
|
||||||
inode->i_mode = S_IFLNK | S_IRWXUGO;
|
inode->i_mode = S_IFLNK | 0777;
|
||||||
break;
|
break;
|
||||||
case ICBTAG_FILE_TYPE_MAIN:
|
case ICBTAG_FILE_TYPE_MAIN:
|
||||||
udf_debug("METADATA FILE-----\n");
|
udf_debug("METADATA FILE-----\n");
|
||||||
|
@ -1591,9 +1591,9 @@ static umode_t udf_convert_permissions(struct fileEntry *fe)
|
||||||
permissions = le32_to_cpu(fe->permissions);
|
permissions = le32_to_cpu(fe->permissions);
|
||||||
flags = le16_to_cpu(fe->icbTag.flags);
|
flags = le16_to_cpu(fe->icbTag.flags);
|
||||||
|
|
||||||
mode = ((permissions) & S_IRWXO) |
|
mode = ((permissions) & 0007) |
|
||||||
((permissions >> 2) & S_IRWXG) |
|
((permissions >> 2) & 0070) |
|
||||||
((permissions >> 4) & S_IRWXU) |
|
((permissions >> 4) & 0700) |
|
||||||
((flags & ICBTAG_FLAG_SETUID) ? S_ISUID : 0) |
|
((flags & ICBTAG_FLAG_SETUID) ? S_ISUID : 0) |
|
||||||
((flags & ICBTAG_FLAG_SETGID) ? S_ISGID : 0) |
|
((flags & ICBTAG_FLAG_SETGID) ? S_ISGID : 0) |
|
||||||
((flags & ICBTAG_FLAG_STICKY) ? S_ISVTX : 0);
|
((flags & ICBTAG_FLAG_STICKY) ? S_ISVTX : 0);
|
||||||
|
@ -1669,9 +1669,9 @@ static int udf_update_inode(struct inode *inode, int do_sync)
|
||||||
else
|
else
|
||||||
fe->gid = cpu_to_le32(i_gid_read(inode));
|
fe->gid = cpu_to_le32(i_gid_read(inode));
|
||||||
|
|
||||||
udfperms = ((inode->i_mode & S_IRWXO)) |
|
udfperms = ((inode->i_mode & 0007)) |
|
||||||
((inode->i_mode & S_IRWXG) << 2) |
|
((inode->i_mode & 0070) << 2) |
|
||||||
((inode->i_mode & S_IRWXU) << 4);
|
((inode->i_mode & 0700) << 4);
|
||||||
|
|
||||||
udfperms |= (le32_to_cpu(fe->permissions) &
|
udfperms |= (le32_to_cpu(fe->permissions) &
|
||||||
(FE_PERM_O_DELETE | FE_PERM_O_CHATTR |
|
(FE_PERM_O_DELETE | FE_PERM_O_CHATTR |
|
||||||
|
|
|
@ -906,7 +906,7 @@ static int udf_unlink(struct inode *dir, struct dentry *dentry)
|
||||||
static int udf_symlink(struct inode *dir, struct dentry *dentry,
|
static int udf_symlink(struct inode *dir, struct dentry *dentry,
|
||||||
const char *symname)
|
const char *symname)
|
||||||
{
|
{
|
||||||
struct inode *inode = udf_new_inode(dir, S_IFLNK | S_IRWXUGO);
|
struct inode *inode = udf_new_inode(dir, S_IFLNK | 0777);
|
||||||
struct pathComponent *pc;
|
struct pathComponent *pc;
|
||||||
const char *compstart;
|
const char *compstart;
|
||||||
struct extent_position epos = {};
|
struct extent_position epos = {};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user