aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/ioctl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 926332a73cde..eff18f5b5362 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -112,7 +112,12 @@ void btrfs_update_iflags(struct inode *inode)
112 */ 112 */
113void btrfs_inherit_iflags(struct inode *inode, struct inode *dir) 113void btrfs_inherit_iflags(struct inode *inode, struct inode *dir)
114{ 114{
115 unsigned int flags = BTRFS_I(dir)->flags; 115 unsigned int flags;
116
117 if (!dir)
118 return;
119
120 flags = BTRFS_I(dir)->flags;
116 121
117 if (S_ISREG(inode->i_mode)) 122 if (S_ISREG(inode->i_mode))
118 flags &= ~BTRFS_INODE_DIRSYNC; 123 flags &= ~BTRFS_INODE_DIRSYNC;