diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 12:10:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 12:10:19 -0400 |
commit | 790eac5640abf7a57fa3a644386df330e18c11b0 (patch) | |
tree | 08de20bde44f59e51b91ff473a71047c2957e8c9 /fs/ecryptfs/file.c | |
parent | 0b0585c3e192967cb2ef0ac0816eb8a8c8d99840 (diff) | |
parent | 48bde8d3620f5f3c6ae9ff599eb404055ae51664 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull second set of VFS changes from Al Viro:
"Assorted f_pos race fixes, making do_splice_direct() safe to call with
i_mutex on parent, O_TMPFILE support, Jeff's locks.c series,
->d_hash/->d_compare calling conventions changes from Linus, misc
stuff all over the place."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
Document ->tmpfile()
ext4: ->tmpfile() support
vfs: export lseek_execute() to modules
lseek_execute() doesn't need an inode passed to it
block_dev: switch to fixed_size_llseek()
cpqphp_sysfs: switch to fixed_size_llseek()
tile-srom: switch to fixed_size_llseek()
proc_powerpc: switch to fixed_size_llseek()
ubi/cdev: switch to fixed_size_llseek()
pci/proc: switch to fixed_size_llseek()
isapnp: switch to fixed_size_llseek()
lpfc: switch to fixed_size_llseek()
locks: give the blocked_hash its own spinlock
locks: add a new "lm_owner_key" lock operation
locks: turn the blocked_list into a hashtable
locks: convert fl_link to a hlist_node
locks: avoid taking global lock if possible when waking up blocked waiters
locks: protect most of the file_lock handling with i_lock
locks: encapsulate the fl_link list handling
locks: make "added" in __posix_lock_file a bool
...
Diffstat (limited to 'fs/ecryptfs/file.c')
-rw-r--r-- | fs/ecryptfs/file.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 9aa05e08060b..24f1105fda3a 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -70,7 +70,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, | |||
70 | struct ecryptfs_getdents_callback { | 70 | struct ecryptfs_getdents_callback { |
71 | struct dir_context ctx; | 71 | struct dir_context ctx; |
72 | struct dir_context *caller; | 72 | struct dir_context *caller; |
73 | struct dentry *dentry; | 73 | struct super_block *sb; |
74 | int filldir_called; | 74 | int filldir_called; |
75 | int entries_written; | 75 | int entries_written; |
76 | }; | 76 | }; |
@@ -88,7 +88,7 @@ ecryptfs_filldir(void *dirent, const char *lower_name, int lower_namelen, | |||
88 | 88 | ||
89 | buf->filldir_called++; | 89 | buf->filldir_called++; |
90 | rc = ecryptfs_decode_and_decrypt_filename(&name, &name_size, | 90 | rc = ecryptfs_decode_and_decrypt_filename(&name, &name_size, |
91 | buf->dentry, lower_name, | 91 | buf->sb, lower_name, |
92 | lower_namelen); | 92 | lower_namelen); |
93 | if (rc) { | 93 | if (rc) { |
94 | printk(KERN_ERR "%s: Error attempting to decode and decrypt " | 94 | printk(KERN_ERR "%s: Error attempting to decode and decrypt " |
@@ -114,15 +114,14 @@ static int ecryptfs_readdir(struct file *file, struct dir_context *ctx) | |||
114 | { | 114 | { |
115 | int rc; | 115 | int rc; |
116 | struct file *lower_file; | 116 | struct file *lower_file; |
117 | struct inode *inode; | 117 | struct inode *inode = file_inode(file); |
118 | struct ecryptfs_getdents_callback buf = { | 118 | struct ecryptfs_getdents_callback buf = { |
119 | .ctx.actor = ecryptfs_filldir, | 119 | .ctx.actor = ecryptfs_filldir, |
120 | .caller = ctx, | 120 | .caller = ctx, |
121 | .dentry = file->f_path.dentry | 121 | .sb = inode->i_sb, |
122 | }; | 122 | }; |
123 | lower_file = ecryptfs_file_to_lower(file); | 123 | lower_file = ecryptfs_file_to_lower(file); |
124 | lower_file->f_pos = ctx->pos; | 124 | lower_file->f_pos = ctx->pos; |
125 | inode = file_inode(file); | ||
126 | rc = iterate_dir(lower_file, &buf.ctx); | 125 | rc = iterate_dir(lower_file, &buf.ctx); |
127 | ctx->pos = buf.ctx.pos; | 126 | ctx->pos = buf.ctx.pos; |
128 | if (rc < 0) | 127 | if (rc < 0) |