From 3a7ed3fff3bb22828f7d7ba6b75c7d22ee54df38 Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Thu, 8 Jan 2015 01:18:30 -0800 Subject: [PATCH] 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-format-patch failed