aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/inode.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-10 15:20:35 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-09-21 07:18:54 -0400
commitc2ba138a27ddac4abbc931599dbce907c868910a (patch)
tree1bc49d763f119d352a5ddb5695d62639bb6181d0 /fs/udf/inode.c
parent39241beb78f69925b0475ad78f06f0e0589fb71b (diff)
userns: Convert the udf filesystem to use kuid/kgid where appropriate
Cc: Jan Kara <jack@suse.cz> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r--fs/udf/inode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index fafaad795cd6..1825dc0af728 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1309,14 +1309,14 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1309 } 1309 }
1310 1310
1311 read_lock(&sbi->s_cred_lock); 1311 read_lock(&sbi->s_cred_lock);
1312 inode->i_uid = le32_to_cpu(fe->uid); 1312 i_uid_write(inode, le32_to_cpu(fe->uid));
1313 if (inode->i_uid == -1 || 1313 if (!uid_valid(inode->i_uid) ||
1314 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_IGNORE) || 1314 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_IGNORE) ||
1315 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_SET)) 1315 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_SET))
1316 inode->i_uid = UDF_SB(inode->i_sb)->s_uid; 1316 inode->i_uid = UDF_SB(inode->i_sb)->s_uid;
1317 1317
1318 inode->i_gid = le32_to_cpu(fe->gid); 1318 i_gid_write(inode, le32_to_cpu(fe->gid));
1319 if (inode->i_gid == -1 || 1319 if (!gid_valid(inode->i_gid) ||
1320 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_IGNORE) || 1320 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_IGNORE) ||
1321 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_SET)) 1321 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_SET))
1322 inode->i_gid = UDF_SB(inode->i_sb)->s_gid; 1322 inode->i_gid = UDF_SB(inode->i_sb)->s_gid;
@@ -1539,12 +1539,12 @@ static int udf_update_inode(struct inode *inode, int do_sync)
1539 if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_FORGET)) 1539 if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_FORGET))
1540 fe->uid = cpu_to_le32(-1); 1540 fe->uid = cpu_to_le32(-1);
1541 else 1541 else
1542 fe->uid = cpu_to_le32(inode->i_uid); 1542 fe->uid = cpu_to_le32(i_uid_read(inode));
1543 1543
1544 if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_FORGET)) 1544 if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_FORGET))
1545 fe->gid = cpu_to_le32(-1); 1545 fe->gid = cpu_to_le32(-1);
1546 else 1546 else
1547 fe->gid = cpu_to_le32(inode->i_gid); 1547 fe->gid = cpu_to_le32(i_gid_read(inode));
1548 1548
1549 udfperms = ((inode->i_mode & S_IRWXO)) | 1549 udfperms = ((inode->i_mode & S_IRWXO)) |
1550 ((inode->i_mode & S_IRWXG) << 2) | 1550 ((inode->i_mode & S_IRWXG) << 2) |