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: NOmar Sandoval <osandov@osandov.com> Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
Showing
想要评论请 注册 或 登录