Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114797
b: refs/heads/master
c: 7d6c704
h: refs/heads/master
i:
  114795: 9b38766
v: v3
  • Loading branch information
Michael Halcrow authored and Linus Torvalds committed Oct 16, 2008
1 parent 41b16a0 commit ec1f12b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 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: 9d793b0bcbbbc37d80241862dfa5257963d5415e
refs/heads/master: 7d6c7045581d3736c5f14053eb59342aa0b2cc07
17 changes: 8 additions & 9 deletions trunk/fs/ecryptfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@ struct ecryptfs_getdents_callback {
void *dirent;
struct dentry *dentry;
filldir_t filldir;
int err;
int filldir_called;
int entries_written;
};

/* Inspired by generic filldir in fs/readir.c */
/* Inspired by generic filldir in fs/readdir.c */
static int
ecryptfs_filldir(void *dirent, const char *name, int namelen, loff_t offset,
u64 ino, unsigned int d_type)
Expand Down Expand Up @@ -125,18 +124,18 @@ static int ecryptfs_readdir(struct file *file, void *dirent, filldir_t filldir)
buf.dirent = dirent;
buf.dentry = file->f_path.dentry;
buf.filldir = filldir;
retry:
buf.filldir_called = 0;
buf.entries_written = 0;
buf.err = 0;
rc = vfs_readdir(lower_file, ecryptfs_filldir, (void *)&buf);
if (buf.err)
rc = buf.err;
if (buf.filldir_called && !buf.entries_written)
goto retry;
file->f_pos = lower_file->f_pos;
if (rc < 0)
goto out;
if (buf.filldir_called && !buf.entries_written)
goto out;
if (rc >= 0)
fsstack_copy_attr_atime(inode, lower_file->f_path.dentry->d_inode);
fsstack_copy_attr_atime(inode,
lower_file->f_path.dentry->d_inode);
out:
return rc;
}

Expand Down

0 comments on commit ec1f12b

Please sign in to comment.