aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-09-30 14:59:01 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-30 15:41:18 -0400
commitdaa35edc0a967d1f77c2e2c1346f57d04371487a (patch)
tree2113b1d03f9e4dff00caebe18693a1cdc253acd8
parentbd948057357db5febfe64cf7a9ef11d7e347ffec (diff)
[PATCH] uml: remove empty hostfs_truncate method
Calling truncate() on hostfs spits a kernel warning "Something isn't implemented here", but it still works fine. Indeed, hostfs i_op->truncate doesn't do anything. But hostfs_setattr() -> set_attr() correctly detects ATTR_SIZE and calls truncate() on the host. So we should be safe (using ftruncate() may be better, in case the file is unlinked on the host, but we aren't sure to have the file open for writing, and reopening it would cause the same races; plus nobody should expect UML to be so careful). So, the warning is wrong, because the current implementation is working. Al, am I correct, and can the warning be therefore dropped? CC: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/hostfs/hostfs_kern.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 59c5062cd63f..dd7113106269 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -793,11 +793,6 @@ int hostfs_rename(struct inode *from_ino, struct dentry *from,
793 return(err); 793 return(err);
794} 794}
795 795
796void hostfs_truncate(struct inode *ino)
797{
798 not_implemented();
799}
800
801int hostfs_permission(struct inode *ino, int desired, struct nameidata *nd) 796int hostfs_permission(struct inode *ino, int desired, struct nameidata *nd)
802{ 797{
803 char *name; 798 char *name;
@@ -894,7 +889,6 @@ static struct inode_operations hostfs_iops = {
894 .rmdir = hostfs_rmdir, 889 .rmdir = hostfs_rmdir,
895 .mknod = hostfs_mknod, 890 .mknod = hostfs_mknod,
896 .rename = hostfs_rename, 891 .rename = hostfs_rename,
897 .truncate = hostfs_truncate,
898 .permission = hostfs_permission, 892 .permission = hostfs_permission,
899 .setattr = hostfs_setattr, 893 .setattr = hostfs_setattr,
900 .getattr = hostfs_getattr, 894 .getattr = hostfs_getattr,
@@ -910,7 +904,6 @@ static struct inode_operations hostfs_dir_iops = {
910 .rmdir = hostfs_rmdir, 904 .rmdir = hostfs_rmdir,
911 .mknod = hostfs_mknod, 905 .mknod = hostfs_mknod,
912 .rename = hostfs_rename, 906 .rename = hostfs_rename,
913 .truncate = hostfs_truncate,
914 .permission = hostfs_permission, 907 .permission = hostfs_permission,
915 .setattr = hostfs_setattr, 908 .setattr = hostfs_setattr,
916 .getattr = hostfs_getattr, 909 .getattr = hostfs_getattr,