aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hostfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hostfs')
-rw-r--r--fs/hostfs/hostfs.h2
-rw-r--r--fs/hostfs/hostfs_kern.c12
-rw-r--r--fs/hostfs/hostfs_user.c1
3 files changed, 8 insertions, 7 deletions
diff --git a/fs/hostfs/hostfs.h b/fs/hostfs/hostfs.h
index 1fe731337f07..9c88da0e855a 100644
--- a/fs/hostfs/hostfs.h
+++ b/fs/hostfs/hostfs.h
@@ -1,7 +1,7 @@
1#ifndef __UM_FS_HOSTFS 1#ifndef __UM_FS_HOSTFS
2#define __UM_FS_HOSTFS 2#define __UM_FS_HOSTFS
3 3
4#include "os.h" 4#include <os.h>
5 5
6/* 6/*
7 * These are exactly the same definitions as in fs.h, but the names are 7 * These are exactly the same definitions as in fs.h, but the names are
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 @@
16#include <linux/mount.h> 16#include <linux/mount.h>
17#include <linux/namei.h> 17#include <linux/namei.h>
18#include "hostfs.h" 18#include "hostfs.h"
19#include "init.h" 19#include <init.h>
20#include "kern.h" 20#include <kern.h>
21 21
22struct hostfs_inode_info { 22struct hostfs_inode_info {
23 int fd; 23 int fd;
@@ -848,9 +848,11 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
848 attr->ia_size != i_size_read(inode)) { 848 attr->ia_size != i_size_read(inode)) {
849 int error; 849 int error;
850 850
851 error = vmtruncate(inode, attr->ia_size); 851 error = inode_newsize_ok(inode, attr->ia_size);
852 if (err) 852 if (error)
853 return err; 853 return error;
854
855 truncate_setsize(inode, attr->ia_size);
854 } 856 }
855 857
856 setattr_copy(inode, attr); 858 setattr_copy(inode, attr);
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c
index a74ad0d371c2..67838f3aa20a 100644
--- a/fs/hostfs/hostfs_user.c
+++ b/fs/hostfs/hostfs_user.c
@@ -15,7 +15,6 @@
15#include <sys/types.h> 15#include <sys/types.h>
16#include <sys/vfs.h> 16#include <sys/vfs.h>
17#include "hostfs.h" 17#include "hostfs.h"
18#include "os.h"
19#include <utime.h> 18#include <utime.h>
20 19
21static void stat64_to_hostfs(const struct stat64 *buf, struct hostfs_stat *p) 20static void stat64_to_hostfs(const struct stat64 *buf, struct hostfs_stat *p)