提交 23963e54 编写于 作者: A Arkadiusz Mi?kiewicz 提交者: Alex Elder

xfs: Disallow 32bit project quota id

Currently on-disk structure is able to keep only 16bit project quota
id, so disallow 32bit ones. This fixes a problem where parts of
kernel structures holding project quota id are 32bit while parts
(on-disk) are 16bit variables which causes project quota member
files to be inaccessible for some operations (like mv/rm).
Signed-off-by: NArkadiusz Mi?kiewicz <arekm@maven.pl>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NAlex Elder <aelder@sgi.com>
上级 2bfc96a1
...@@ -906,6 +906,13 @@ xfs_ioctl_setattr( ...@@ -906,6 +906,13 @@ xfs_ioctl_setattr(
if (XFS_FORCED_SHUTDOWN(mp)) if (XFS_FORCED_SHUTDOWN(mp))
return XFS_ERROR(EIO); return XFS_ERROR(EIO);
/*
* Disallow 32bit project ids because on-disk structure
* is 16bit only.
*/
if ((mask & FSX_PROJID) && (fa->fsx_projid > (__uint16_t)-1))
return XFS_ERROR(EINVAL);
/* /*
* If disk quotas is on, we make sure that the dquots do exist on disk, * If disk quotas is on, we make sure that the dquots do exist on disk,
* before we start any other transactions. Trying to do this later * before we start any other transactions. Trying to do this later
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册