mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-08 11:45:53 -05:00
[CIFS] cifs_partialpagewrite() cleanup
rc cannot be -EBADF now and condition is always true Signed-off-by: Vasily Averin <[email protected]> Signed-off-by: Steve French <[email protected]>
This commit is contained in:
parent
1a67570c76
commit
bb5a9a04d4
1 changed files with 3 additions and 5 deletions
|
|
@ -1179,12 +1179,10 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to)
|
|||
atomic_dec(&open_file->wrtPending);
|
||||
/* Does mm or vfs already set times? */
|
||||
inode->i_atime = inode->i_mtime = current_fs_time(inode->i_sb);
|
||||
if ((bytes_written > 0) && (offset)) {
|
||||
if ((bytes_written > 0) && (offset))
|
||||
rc = 0;
|
||||
} else if (bytes_written < 0) {
|
||||
if (rc != -EBADF)
|
||||
rc = bytes_written;
|
||||
}
|
||||
else if (bytes_written < 0)
|
||||
rc = bytes_written;
|
||||
} else {
|
||||
cFYI(1, ("No writeable filehandles for inode"));
|
||||
rc = -EIO;
|
||||
|
|
|
|||
Loading…
Reference in a new issue