aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorChristoph Lameter <christoph@graphe.net>2005-06-23 03:10:17 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:33 -0400
commit45778ca819accab1a4a3378b3566cab0f189164f (patch)
tree9214491346c8d2d91eb1a11cb6c2e6a9387e4290 /fs/open.c
parent280dedb8d64ccfe1166ae03d3b254fc3b65de6a5 (diff)
[PATCH] Remove f_error field from struct file
The following patch removes the f_error field and all checks of f_error. Trond said: f_error was introduced for NFS, and made sense when we were guaranteed always to have a file pointer around when write errors occurred. Since then, we have (for various reasons) had to introduce the nfs_open_context in order to track the file read/write state, and it made sense to move our f_error tracking there too. Signed-off-by: Christoph Lameter <christoph@lameter.com> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/open.c b/fs/open.c
index 2ebb72c1a876..5dd411b084bf 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -981,23 +981,15 @@ asmlinkage long sys_creat(const char __user * pathname, int mode)
981 */ 981 */
982int filp_close(struct file *filp, fl_owner_t id) 982int filp_close(struct file *filp, fl_owner_t id)
983{ 983{
984 int retval; 984 int retval = 0;
985
986 /* Report and clear outstanding errors */
987 retval = filp->f_error;
988 if (retval)
989 filp->f_error = 0;
990 985
991 if (!file_count(filp)) { 986 if (!file_count(filp)) {
992 printk(KERN_ERR "VFS: Close: file count is 0\n"); 987 printk(KERN_ERR "VFS: Close: file count is 0\n");
993 return retval; 988 return 0;
994 } 989 }
995 990
996 if (filp->f_op && filp->f_op->flush) { 991 if (filp->f_op && filp->f_op->flush)
997 int err = filp->f_op->flush(filp); 992 retval = filp->f_op->flush(filp);
998 if (!retval)
999 retval = err;
1000 }
1001 993
1002 dnotify_flush(filp, id); 994 dnotify_flush(filp, id);
1003 locks_remove_posix(filp, id); 995 locks_remove_posix(filp, id);