projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b2a2c6
)
btrfs: S_ISREG(mode) is not mode & S_IFREG...
author
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 24 Jul 2011 21:08:40 +0000
(17:08 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 26 Jul 2011 17:05:05 +0000
(13:05 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/btrfs/inode.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/inode.c
b/fs/btrfs/inode.c
index e91b097e7252a911dcaa61eed0188bfeae500d2a..caa26ab5ed6833094a3334ed388edca18d2fd15a 100644
(file)
--- 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) ||