From: Omar Sandoval Date: Thu, 8 Jan 2015 09:18:30 +0000 (-0800) Subject: nfs: prevent truncate on active swapfile X-Git-Tag: fixes-v4.0-rc1~136^2~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a7ed3fff3bb22828f7d7ba6b75c7d22ee54df38;p=pandora-kernel.git nfs: prevent truncate on active swapfile Most filesystems prevent truncation of an active swapfile by way of inode_newsize_ok, called from inode_change_ok. NFS doesn't call either from nfs_setattr, presumably because most of these checks are expected to be done server-side. However, the IS_SWAPFILE check can only be done client-side, and truncating a swapfile can't possibly be good. Signed-off-by: Omar Sandoval Signed-off-by: Trond Myklebust --- Reading git-diff-tree failed