Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213429
b: refs/heads/master
c: 6221ddd
h: refs/heads/master
i:
  213427: 7045891
v: v3
  • Loading branch information
Suresh Jayaraman authored and Steve French committed Oct 15, 2010
1 parent 6ccfc33 commit f86e00f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d0d28824c76409f0d1a645bf0ae81318c8ffa42
refs/heads/master: 6221ddd0f5e2ddc1d5d928119a2cde033d16f96d
19 changes: 11 additions & 8 deletions trunk/fs/cifs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,17 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)

cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);

/*
* Ensure FindFirst doesn't fail before doing filldir() for '.' and
* '..'. Otherwise we won't be able to notify VFS in case of failure.
*/
if (file->private_data == NULL) {
rc = initiate_cifs_search(xid, file);
cFYI(1, "initiate cifs search rc %d", rc);
if (rc)
goto rddir2_exit;
}

switch ((int) file->f_pos) {
case 0:
if (filldir(direntry, ".", 1, file->f_pos,
Expand All @@ -813,14 +824,6 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
if it before then restart search
if after then keep searching till find it */

if (file->private_data == NULL) {
rc = initiate_cifs_search(xid, file);
cFYI(1, "initiate cifs search rc %d", rc);
if (rc) {
FreeXid(xid);
return rc;
}
}
if (file->private_data == NULL) {
rc = -EINVAL;
FreeXid(xid);
Expand Down

0 comments on commit f86e00f

Please sign in to comment.