mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[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 <[email protected]> Acked-by: Trond Myklebust <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
280dedb8d6
commit
45778ca819
4 changed files with 4 additions and 24 deletions
|
|
@ -1827,12 +1827,6 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i
|
|||
if (unlikely(*pos < 0))
|
||||
return -EINVAL;
|
||||
|
||||
if (unlikely(file->f_error)) {
|
||||
int err = file->f_error;
|
||||
file->f_error = 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
if (!isblk) {
|
||||
/* FIXME: this is for backwards compatibility with 2.4 */
|
||||
if (file->f_flags & O_APPEND)
|
||||
|
|
|
|||
Loading…
Reference in a new issue