summaryrefslogtreecommitdiff
authorAl Viro <viro@zeniv.linux.org.uk>2019-05-02 02:46:11 (GMT)
committer Greg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-25 16:26:56 (GMT)
commit2871ffa4d5294910aad133cc84f4d6214d633d72 (patch)
tree2728ddb845e373dbac83e9d545ee20b6124d5407
parent5e593636921f8cc1366eb7ec1ad8a75ccc52748d (diff)
downloadcommon-2871ffa4d5294910aad133cc84f4d6214d633d72.zip
common-2871ffa4d5294910aad133cc84f4d6214d633d72.tar.gz
common-2871ffa4d5294910aad133cc84f4d6214d633d72.tar.bz2
ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour
[ Upstream commit 4e9036042fedaffcd868d7f7aa948756c48c637d ] To choose whether to pick the GID from the old (16bit) or new (32bit) field, we should check if the old gid field is set to 0xffff. Mainline checks the old *UID* field instead - cut'n'paste from the corresponding code in ufs_get_inode_uid(). Fixes: 252e211e90ce Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat
-rw-r--r--fs/ufs/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ufs/util.h b/fs/ufs/util.h
index 398019f..9c4fb1f 100644
--- a/fs/ufs/util.h
+++ b/fs/ufs/util.h
@@ -228,7 +228,7 @@ ufs_get_inode_gid(struct super_block *sb, struct ufs_inode *inode)
case UFS_UID_44BSD:
return fs32_to_cpu(sb, inode->ui_u3.ui_44.ui_gid);
case UFS_UID_EFT:
- if (inode->ui_u1.oldids.ui_suid == 0xFFFF)
+ if (inode->ui_u1.oldids.ui_sgid == 0xFFFF)
return fs32_to_cpu(sb, inode->ui_u3.ui_sun.ui_gid);
/* Fall through */
default: