]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - fs/hostfs/hostfs_kern.c
Merge branch 'for-linus-37rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
[~shefty/rdma-dev.git] / fs / hostfs / hostfs_kern.c
index 6c9f3a9d5e211adcadb8e93c80bbd7b12d4460db..457addc5c91f2f2da42092d9f193a47aa8f678dd 100644 (file)
@@ -16,8 +16,8 @@
 #include <linux/mount.h>
 #include <linux/namei.h>
 #include "hostfs.h"
-#include "init.h"
-#include "kern.h"
+#include <init.h>
+#include <kern.h>
 
 struct hostfs_inode_info {
        int fd;
@@ -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);