]>
Commit | Line | Data |
---|---|---|
1aa7b030 SL |
1 | From ae70e01e01cd150e911983a812f4d0bf4783d0c7 Mon Sep 17 00:00:00 2001 |
2 | From: Al Viro <viro@zeniv.linux.org.uk> | |
3 | Date: Wed, 1 May 2019 22:46:11 -0400 | |
4 | Subject: ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour | |
5 | ||
6 | [ Upstream commit 4e9036042fedaffcd868d7f7aa948756c48c637d ] | |
7 | ||
8 | To choose whether to pick the GID from the old (16bit) or new (32bit) | |
9 | field, we should check if the old gid field is set to 0xffff. Mainline | |
10 | checks the old *UID* field instead - cut'n'paste from the corresponding | |
11 | code in ufs_get_inode_uid(). | |
12 | ||
13 | Fixes: 252e211e90ce | |
14 | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | |
15 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
16 | --- | |
17 | fs/ufs/util.h | 2 +- | |
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
19 | ||
20 | diff --git a/fs/ufs/util.h b/fs/ufs/util.h | |
21 | index 3f9463f8cf2fa..f877d5cadd981 100644 | |
22 | --- a/fs/ufs/util.h | |
23 | +++ b/fs/ufs/util.h | |
24 | @@ -228,7 +228,7 @@ ufs_get_inode_gid(struct super_block *sb, struct ufs_inode *inode) | |
25 | case UFS_UID_44BSD: | |
26 | return fs32_to_cpu(sb, inode->ui_u3.ui_44.ui_gid); | |
27 | case UFS_UID_EFT: | |
28 | - if (inode->ui_u1.oldids.ui_suid == 0xFFFF) | |
29 | + if (inode->ui_u1.oldids.ui_sgid == 0xFFFF) | |
30 | return fs32_to_cpu(sb, inode->ui_u3.ui_sun.ui_gid); | |
31 | /* Fall through */ | |
32 | default: | |
33 | -- | |
34 | 2.20.1 | |
35 |