summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-12-31 04:21:29 +0000
committerSteve French <sfrench@us.ibm.com>2007-12-31 04:21:29 +0000
commitbb5a9a04d4cab4b13d63ac5cd3e1fb35f9583607 (patch)
tree96d6aa52820f1e615c4a906d0ecee408d46615aa /fs/cifs
parent1a67570c76402b36695cd0725e28649ee8fe830d (diff)
downloadlinux-3.10-bb5a9a04d4cab4b13d63ac5cd3e1fb35f9583607.tar.gz
linux-3.10-bb5a9a04d4cab4b13d63ac5cd3e1fb35f9583607.tar.bz2
linux-3.10-bb5a9a04d4cab4b13d63ac5cd3e1fb35f9583607.zip
[CIFS] cifs_partialpagewrite() cleanup
rc cannot be -EBADF now and condition is always true Signed-off-by: Vasily Averin <vvs@sw.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/file.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index dd26e2759b1..5f7c374ae89 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -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;