xfs: kill suid/sgid through the truncate path.
authorDave Chinner <dchinner@redhat.com>
Mon, 27 May 2013 06:38:25 +0000 (16:38 +1000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 19 Jun 2013 01:16:40 +0000 (02:16 +0100)
commit81428790d5392ba103ff27a8e0ac0bc0a4959713
treeb06518585f2959562d8460e9fae5492f3bb4baf8
parente597b7c39df9cf5a66e740bc6a5cf10fa083dee8
xfs: kill suid/sgid through the truncate path.

commit 2962f5a5dcc56f69cbf62121a7be67cc15d6940b upstream.

XFS has failed to kill suid/sgid bits correctly when truncating
files of non-zero size since commit c4ed4243 ("xfs: split
xfs_setattr") introduced in the 3.1 kernel. Fix it.

Fix it.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit 56c19e89b38618390addfc743d822f99519055c6)
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/xfs/xfs_iops.c