Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
- fs/cifs/file.c | 27 +++++++++++----------------
+ fs/cifs/file.c | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
-diff --git a/fs/cifs/file.c b/fs/cifs/file.c
-index 8703b5f26f452..26027d85ffd57 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
-@@ -1835,13 +1835,12 @@ struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1841,13 +1841,12 @@ struct cifsFileInfo *find_readable_file(
{
struct cifsFileInfo *open_file = NULL;
struct cifs_sb_info *cifs_sb = CIFS_SB(cifs_inode->vfs_inode.i_sb);
/* we could simply get the first_list_entry since write-only entries
are always at the end of the list but since the first entry might
have a close pending, we go through the whole list */
-@@ -1853,7 +1852,7 @@ struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1859,7 +1858,7 @@ struct cifsFileInfo *find_readable_file(
/* found a good file */
/* lock it so it will not be closed on us */
cifsFileInfo_get(open_file);
return open_file;
} /* else might as well continue, and look for
another, or simply have the caller reopen it
-@@ -1861,7 +1860,7 @@ struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1867,7 +1866,7 @@ struct cifsFileInfo *find_readable_file(
} else /* write only file */
break; /* write only files are last so must be done */
}
return NULL;
}
-@@ -1870,7 +1869,6 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1876,7 +1875,6 @@ struct cifsFileInfo *find_writable_file(
{
struct cifsFileInfo *open_file, *inv_file = NULL;
struct cifs_sb_info *cifs_sb;
bool any_available = false;
int rc;
unsigned int refind = 0;
-@@ -1886,16 +1884,15 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1892,16 +1890,15 @@ struct cifsFileInfo *find_writable_file(
}
cifs_sb = CIFS_SB(cifs_inode->vfs_inode.i_sb);
return NULL;
}
list_for_each_entry(open_file, &cifs_inode->openFileList, flist) {
-@@ -1907,7 +1904,7 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1913,7 +1910,7 @@ refind_writable:
if (!open_file->invalidHandle) {
/* found a good writable file */
cifsFileInfo_get(open_file);
return open_file;
} else {
if (!inv_file)
-@@ -1926,7 +1923,7 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1932,7 +1929,7 @@ refind_writable:
cifsFileInfo_get(inv_file);
}
if (inv_file) {
rc = cifs_reopen_file(inv_file, false);
-@@ -1940,7 +1937,7 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1946,7 +1943,7 @@ refind_writable:
cifsFileInfo_put(inv_file);
++refind;
inv_file = NULL;
goto refind_writable;
}
}
-@@ -4001,17 +3998,15 @@ static int cifs_readpage(struct file *file, struct page *page)
+@@ -4007,17 +4004,15 @@ static int cifs_readpage(struct file *fi
static int is_inode_writable(struct cifsInodeInfo *cifs_inode)
{
struct cifsFileInfo *open_file;
return 0;
}
---
-2.20.1
-