hostfs: drop vmtruncate
authorMarco Stornelli <marco.stornelli@gmail.com>
Sat, 6 Oct 2012 08:31:13 +0000 (10:31 +0200)
committerRichard Weinberger <richard@nod.at>
Tue, 9 Oct 2012 20:33:19 +0000 (22:33 +0200)
Removed vmtruncate.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/hostfs/hostfs_kern.c

index 9e45f65241ee3a6ad3c04930670c990156fc4478..3c423c746b59d9062716e95df56549471c742ea6 100644 (file)
@@ -848,9 +848,11 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
            attr->ia_size != i_size_read(inode)) {
                int error;
 
-               error = vmtruncate(inode, attr->ia_size);
-               if (err)
-                       return err;
+               error = inode_newsize_ok(inode, attr->ia_size);
+               if (error)
+                       return error;
+
+               truncate_setsize(inode, attr->ia_size);
        }
 
        setattr_copy(inode, attr);