diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-24 17:08:40 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-26 13:05:05 -0400 |
commit | 569254b0cc4e125ffde48780b215ecaf5f72bbf4 (patch) | |
tree | 17ff0f097c6245a2bc9ba06e9ba87ea68092b505 /fs/btrfs/inode.c | |
parent | 4b2a2c67415f1ab128f1d0b340fe6d13363335e5 (diff) |
btrfs: S_ISREG(mode) is not mode & S_IFREG...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e91b097e7252..caa26ab5ed68 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -4467,7 +4467,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, | |||
4467 | inode->i_generation = BTRFS_I(inode)->generation; | 4467 | inode->i_generation = BTRFS_I(inode)->generation; |
4468 | btrfs_set_inode_space_info(root, inode); | 4468 | btrfs_set_inode_space_info(root, inode); |
4469 | 4469 | ||
4470 | if (mode & S_IFDIR) | 4470 | if (S_ISDIR(mode)) |
4471 | owner = 0; | 4471 | owner = 0; |
4472 | else | 4472 | else |
4473 | owner = 1; | 4473 | owner = 1; |
@@ -4512,7 +4512,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, | |||
4512 | 4512 | ||
4513 | btrfs_inherit_iflags(inode, dir); | 4513 | btrfs_inherit_iflags(inode, dir); |
4514 | 4514 | ||
4515 | if ((mode & S_IFREG)) { | 4515 | if (S_ISREG(mode)) { |
4516 | if (btrfs_test_opt(root, NODATASUM)) | 4516 | if (btrfs_test_opt(root, NODATASUM)) |
4517 | BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM; | 4517 | BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM; |
4518 | if (btrfs_test_opt(root, NODATACOW) || | 4518 | if (btrfs_test_opt(root, NODATACOW) || |