From 37185b33240870719b6b5913a46e6a441f1ae96f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 8 Oct 2012 03:27:32 +0100 Subject: um: get rid of pointless include "..." where include <...> will do Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs.h | 2 +- fs/hostfs/hostfs_kern.c | 4 ++-- fs/hostfs/hostfs_user.c | 1 - fs/hppfs/hppfs.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) (limited to 'fs') 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 @@ #ifndef __UM_FS_HOSTFS #define __UM_FS_HOSTFS -#include "os.h" +#include /* * 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 124146543aa7..9e45f65241ee 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -16,8 +16,8 @@ #include #include #include "hostfs.h" -#include "init.h" -#include "kern.h" +#include +#include struct hostfs_inode_info { int fd; 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 @@ #include #include #include "hostfs.h" -#include "os.h" #include static 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..a68cb2092512 100644 --- a/fs/hppfs/hppfs.c +++ b/fs/hppfs/hppfs.c @@ -18,7 +18,7 @@ #include #include #include -#include "os.h" +#include static struct inode *get_inode(struct super_block *, struct dentry *); -- cgit v1.2.3 From 3be2be0a32c18b0fd6d623cda63174a332ca0de1 Mon Sep 17 00:00:00 2001 From: Marco Stornelli Date: Sat, 6 Oct 2012 10:31:13 +0200 Subject: hostfs: drop vmtruncate Removed vmtruncate. Signed-off-by: Marco Stornelli Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fs') diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 9e45f65241ee..3c423c746b59 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -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); -- cgit v1.2.3 From 91312c53aff4c9863dca6080182091dc5c5824c6 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Fri, 21 Sep 2012 12:55:02 +0800 Subject: hppfs: fix the return value of get_inode() In case of error, the function get_inode() returns ERR_PTR(). But the users hppfs_lookup() and hppfs_fill_super() use NULL test for check the return value, not IS_ERR(), so we'd better change the return value of get_inode() to NULL instead of ERR_PTR(). dpatch engine is used to generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun Signed-off-by: Richard Weinberger --- fs/hppfs/hppfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c index a68cb2092512..78f21f8dc2ec 100644 --- a/fs/hppfs/hppfs.c +++ b/fs/hppfs/hppfs.c @@ -674,7 +674,7 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry) if (!inode) { dput(dentry); - return ERR_PTR(-ENOMEM); + return NULL; } if (S_ISDIR(dentry->d_inode->i_mode)) { -- cgit v1.2.3