提交 0b4dcea5 编写于 作者: C Chris Mason

Btrfs: fix oops when btrfs_inherit_iflags called with a NULL dir

This happens during subvol creation.
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 067c28ad
......@@ -112,7 +112,12 @@ void btrfs_update_iflags(struct inode *inode)
*/
void btrfs_inherit_iflags(struct inode *inode, struct inode *dir)
{
unsigned int flags = BTRFS_I(dir)->flags;
unsigned int flags;
if (!dir)
return;
flags = BTRFS_I(dir)->flags;
if (S_ISREG(inode->i_mode))
flags &= ~BTRFS_INODE_DIRSYNC;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册