Re: [PATCH] nfs: prevent truncate on active swapfile

2014-12-18 Thread Omar Sandoval
On Thu, Dec 18, 2014 at 10:29:18PM -0800, Omar Sandoval wrote: > 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-

[PATCH] nfs: prevent truncate on active swapfile

2014-12-18 Thread Omar Sandoval
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