projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
067c28a
)
Btrfs: fix oops when btrfs_inherit_iflags called with a NULL dir
author
Chris Mason
<chris.mason@oracle.com>
Thu, 11 Jun 2009 15:13:35 +0000
(11:13 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Thu, 11 Jun 2009 15:13:35 +0000
(11:13 -0400)
This happens during subvol creation.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ioctl.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/ioctl.c
b/fs/btrfs/ioctl.c
index 926332a73cdefd957cf1ef483544f460d9f1278a..eff18f5b53620f20a392f9c57a80c8897c61d317 100644
(file)
--- a/
fs/btrfs/ioctl.c
+++ b/
fs/btrfs/ioctl.c
@@
-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;