diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index eb95670..0f74beb 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -3032,6 +3032,10 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr) attr->ia_valid & ATTR_SIZE && attr->ia_size < inode->i_size) { handle_t *handle; + if (IS_SWAPFILE(inode)) { + rc = -ETXTBSY; + goto err_out; + } handle = ext3_journal_start(inode, 3); if (IS_ERR(handle)) { error = PTR_ERR(handle);