提交 bb5a9a04 编写于 作者: S Steve French

[CIFS] cifs_partialpagewrite() cleanup

rc cannot be -EBADF now and condition is always true
Signed-off-by: NVasily Averin <vvs@sw.ru>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 1a67570c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册