[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>
This commit is contained in:
committed by
Linus Torvalds
parent
280dedb8d6
commit
45778ca819
@@ -751,11 +751,6 @@ nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count,
|
||||
retval = -EFAULT;
|
||||
if (!access_ok(VERIFY_READ, iov.iov_base, iov.iov_len))
|
||||
goto out;
|
||||
if (file->f_error) {
|
||||
retval = file->f_error;
|
||||
file->f_error = 0;
|
||||
goto out;
|
||||
}
|
||||
retval = -EFBIG;
|
||||
if (limit != RLIM_INFINITY) {
|
||||
if (pos >= limit) {
|
||||
|
Reference in New Issue
Block a user