diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/direct.c | 5 | ||||
-rw-r--r-- | fs/open.c | 16 |
2 files changed, 4 insertions, 17 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index d6a30c844d..6537f2c4ae 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -751,11 +751,6 @@ nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count, | |||
751 | retval = -EFAULT; | 751 | retval = -EFAULT; |
752 | if (!access_ok(VERIFY_READ, iov.iov_base, iov.iov_len)) | 752 | if (!access_ok(VERIFY_READ, iov.iov_base, iov.iov_len)) |
753 | goto out; | 753 | goto out; |
754 | if (file->f_error) { | ||
755 | retval = file->f_error; | ||
756 | file->f_error = 0; | ||
757 | goto out; | ||
758 | } | ||
759 | retval = -EFBIG; | 754 | retval = -EFBIG; |
760 | if (limit != RLIM_INFINITY) { | 755 | if (limit != RLIM_INFINITY) { |
761 | if (pos >= limit) { | 756 | if (pos >= limit) { |
@@ -981,23 +981,15 @@ asmlinkage long sys_creat(const char __user * pathname, int mode) | |||
981 | */ | 981 | */ |
982 | int filp_close(struct file *filp, fl_owner_t id) | 982 | int 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); |