diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-10-12 17:25:24 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-10-12 18:01:42 -0400 |
commit | e9069f470803eeb5e243a05bc717452c6218bd71 (patch) | |
tree | 0e1dbceee504f04ad6f5c2ecc44e91021338280b /fs | |
parent | ea1fd7776e7ed41ee4ddcff32104db5c7b372309 (diff) |
btrfs: Fix compilation with user namespace support enabled
When compiling with user namespace support btrfs fails like:
fs/btrfs/tree-log.c: In function ‘fill_inode_item’:
fs/btrfs/tree-log.c:2955:2: error: incompatible type for argument 3 of ‘btrfs_set_inode_uid’
fs/btrfs/ctree.h:2026:1: note: expected ‘u32’ but argument is of type ‘kuid_t’
fs/btrfs/tree-log.c:2956:2: error: incompatible type for argument 3 of ‘btrfs_set_inode_gid’
fs/btrfs/ctree.h:2027:1: note: expected ‘u32’ but argument is of type ‘kgid_t’
Fix this by using i_uid_read and i_gid_read in
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/tree-log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index e9ebb472b28b..81e407d9677a 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -2952,8 +2952,8 @@ static void fill_inode_item(struct btrfs_trans_handle *trans, | |||
2952 | struct btrfs_inode_item *item, | 2952 | struct btrfs_inode_item *item, |
2953 | struct inode *inode, int log_inode_only) | 2953 | struct inode *inode, int log_inode_only) |
2954 | { | 2954 | { |
2955 | btrfs_set_inode_uid(leaf, item, inode->i_uid); | 2955 | btrfs_set_inode_uid(leaf, item, i_uid_read(inode)); |
2956 | btrfs_set_inode_gid(leaf, item, inode->i_gid); | 2956 | btrfs_set_inode_gid(leaf, item, i_gid_read(inode)); |
2957 | btrfs_set_inode_mode(leaf, item, inode->i_mode); | 2957 | btrfs_set_inode_mode(leaf, item, inode->i_mode); |
2958 | btrfs_set_inode_nlink(leaf, item, inode->i_nlink); | 2958 | btrfs_set_inode_nlink(leaf, item, inode->i_nlink); |
2959 | 2959 | ||