aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/hostfs/hostfs.h2
-rw-r--r--fs/hostfs/hostfs_kern.c12
-rw-r--r--fs/hostfs/hostfs_user.c1
-rw-r--r--fs/hppfs/hppfs.c4
4 files changed, 10 insertions, 9 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)
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c
index c1dffe47fde2..78f21f8dc2ec 100644
--- a/fs/hppfs/hppfs.c
+++ b/fs/hppfs/hppfs.c
@@ -18,7 +18,7 @@
18#include <linux/pid_namespace.h> 18#include <linux/pid_namespace.h>
19#include <linux/namei.h> 19#include <linux/namei.h>
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21#include "os.h" 21#include <os.h>
22 22
23static struct inode *get_inode(struct super_block *, struct dentry *); 23static struct inode *get_inode(struct super_block *, struct dentry *);
24 24
@@ -674,7 +674,7 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
674 674
675 if (!inode) { 675 if (!inode) {
676 dput(dentry); 676 dput(dentry);
677 return ERR_PTR(-ENOMEM); 677 return NULL;
678 } 678 }
679 679
680 if (S_ISDIR(dentry->d_inode->i_mode)) { 680 if (S_ISDIR(dentry->d_inode->i_mode)) {