Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit42f15d7

Browse files
committed
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 creationbecause sometimes the dir is null.Signed-off-by: Chris Mason <chris.mason@oracle.com>
1 parent806638b commit42f15d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎fs/btrfs/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3491,7 +3491,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
34913491

34923492
inode->i_uid=current_fsuid();
34933493

3494-
if (dir->i_mode&S_ISGID) {
3494+
if (dir&& (dir->i_mode&S_ISGID)) {
34953495
inode->i_gid=dir->i_gid;
34963496
if (S_ISDIR(mode))
34973497
mode |=S_ISGID;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp