Btrfs: Make sure dir is non-null before doing S_ISGID checks
authorChris Mason <chris.mason@oracle.com>
Fri, 6 Feb 2009 16:35:57 +0000 (11:35 -0500)
committerChris Mason <chris.mason@oracle.com>
Fri, 6 Feb 2009 16:35:57 +0000 (11:35 -0500)
commit42f15d77df8a7e8a2feb15041d5d30710ee7f951
tree5b6a3cdaab135c41848952874a6fab086b8b9f72
parent806638bce99f51deccbfedbe86ab3c5cf55a1d35
Btrfs: Make sure dir is non-null before doing S_ISGID checks

The S_ISGID check in btrfs_new_inode caused an oops during subvol creation
because sometimes the dir is null.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c