diff options
Diffstat (limited to 'fs/hostfs/hostfs_kern.c')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 6c9f3a9d5e21..457addc5c91f 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -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); |