projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
440fbc3
)
afs: Fix missing error handling in afs_write_end()
author
David Howells
<
[email protected]
>
Tue, 2 Jan 2018 10:02:19 +0000
(10:02 +0000)
committer
David Howells
<
[email protected]
>
Tue, 2 Jan 2018 10:02:19 +0000
(10:02 +0000)
afs_write_end() is missing page unlock and put if afs_fill_page() fails.
Reported-by: Al Viro <
[email protected]
>
Signed-off-by: David Howells <
[email protected]
>
fs/afs/write.c
patch
|
blob
|
history
diff --git
a/fs/afs/write.c
b/fs/afs/write.c
index cb5f8a3df5773cba37c292e65ac6e985b0af11bc..9370e2feb999303098d36aab4234d9f2fef7f24a 100644
(file)
--- a/
fs/afs/write.c
+++ b/
fs/afs/write.c
@@
-198,7
+198,7
@@
int afs_write_end(struct file *file, struct address_space *mapping,
ret = afs_fill_page(vnode, key, pos + copied,
len - copied, page);
if (ret < 0)
-
return re
t;
+
goto ou
t;
}
SetPageUptodate(page);
}
@@
-206,10
+206,12
@@
int afs_write_end(struct file *file, struct address_space *mapping,
set_page_dirty(page);
if (PageDirty(page))
_debug("dirtied");
+ ret = copied;
+
+out:
unlock_page(page);
put_page(page);
-
- return copied;
+ return ret;
}
/*