From: Al Viro Date: Sun, 24 Jul 2011 21:08:40 +0000 (-0400) Subject: btrfs: S_ISREG(mode) is not mode & S_IFREG... X-Git-Tag: firefly_0821_release~3680^2~4839^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=569254b0cc4e125ffde48780b215ecaf5f72bbf4;p=firefly-linux-kernel-4.4.55.git btrfs: S_ISREG(mode) is not mode & S_IFREG... Signed-off-by: Al Viro --- 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, inode->i_generation = BTRFS_I(inode)->generation; btrfs_set_inode_space_info(root, inode); - if (mode & S_IFDIR) + if (S_ISDIR(mode)) owner = 0; else owner = 1; @@ -4512,7 +4512,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, btrfs_inherit_iflags(inode, dir); - if ((mode & S_IFREG)) { + if (S_ISREG(mode)) { if (btrfs_test_opt(root, NODATASUM)) BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM; if (btrfs_test_opt(root, NODATACOW) ||