Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322865
b: refs/heads/master
c: 64e6651
h: refs/heads/master
i:
  322863: a0752b0
v: v3
  • Loading branch information
Tyler Hicks committed Sep 14, 2012
1 parent 14196ad commit 07ca2ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 7149f2558d5b5b988726662fe58b1c388337805b
refs/heads/master: 64e6651dcc10e9d2cc6230208a8e6c2cfd19ae18
10 changes: 8 additions & 2 deletions trunk/fs/ecryptfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,14 @@ static int ecryptfs_open(struct inode *inode, struct file *file)

static int ecryptfs_flush(struct file *file, fl_owner_t td)
{
return file->f_mode & FMODE_WRITE
? filemap_write_and_wait(file->f_mapping) : 0;
struct file *lower_file = ecryptfs_file_to_lower(file);

if (lower_file->f_op && lower_file->f_op->flush) {
filemap_write_and_wait(file->f_mapping);
return lower_file->f_op->flush(lower_file, td);
}

return 0;
}

static int ecryptfs_release(struct inode *inode, struct file *file)
Expand Down

0 comments on commit 07ca2ec

Please sign in to comment.