diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-05 21:32:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-05 21:32:06 -0500 |
commit | 520c85346666d4d9a6fcaaa8450542302dc28b91 (patch) | |
tree | 9c9cc9e2493b606104dd8602302ae28258ebeac0 /fs/ecryptfs | |
parent | e8c82c2e23e3527e0c9dc195e432c16784d270fa (diff) | |
parent | 4ae8978cf92a96257cd8998a49e781be83571d64 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
inotify: fix type errors in interfaces
fix breakage in reiserfs_new_inode()
fix the treatment of jfs special inodes
vfs: remove duplicate code in get_fs_type()
add a vfs_fsync helper
sys_execve and sys_uselib do not call into fsnotify
zero i_uid/i_gid on inode allocation
inode->i_op is never NULL
ntfs: don't NULL i_op
isofs check for NULL ->i_op in root directory is dead code
affs: do not zero ->i_op
kill suid bit only for regular files
vfs: lseek(fd, 0, SEEK_CUR) race condition
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r-- | fs/ecryptfs/file.c | 15 | ||||
-rw-r--r-- | fs/ecryptfs/inode.c | 3 |
2 files changed, 4 insertions, 14 deletions
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index eb3dc4c7ac0..71383437122 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -275,18 +275,9 @@ static int ecryptfs_release(struct inode *inode, struct file *file) | |||
275 | static int | 275 | static int |
276 | ecryptfs_fsync(struct file *file, struct dentry *dentry, int datasync) | 276 | ecryptfs_fsync(struct file *file, struct dentry *dentry, int datasync) |
277 | { | 277 | { |
278 | struct file *lower_file = ecryptfs_file_to_lower(file); | 278 | return vfs_fsync(ecryptfs_file_to_lower(file), |
279 | struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); | 279 | ecryptfs_dentry_to_lower(dentry), |
280 | struct inode *lower_inode = lower_dentry->d_inode; | 280 | datasync); |
281 | int rc = -EINVAL; | ||
282 | |||
283 | if (lower_inode->i_fop->fsync) { | ||
284 | mutex_lock(&lower_inode->i_mutex); | ||
285 | rc = lower_inode->i_fop->fsync(lower_file, lower_dentry, | ||
286 | datasync); | ||
287 | mutex_unlock(&lower_inode->i_mutex); | ||
288 | } | ||
289 | return rc; | ||
290 | } | 281 | } |
291 | 282 | ||
292 | static int ecryptfs_fasync(int fd, struct file *file, int flag) | 283 | static int ecryptfs_fasync(int fd, struct file *file, int flag) |
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 5e78fc17988..0111906a887 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -612,8 +612,7 @@ ecryptfs_readlink(struct dentry *dentry, char __user * buf, int bufsiz) | |||
612 | struct ecryptfs_crypt_stat *crypt_stat; | 612 | struct ecryptfs_crypt_stat *crypt_stat; |
613 | 613 | ||
614 | lower_dentry = ecryptfs_dentry_to_lower(dentry); | 614 | lower_dentry = ecryptfs_dentry_to_lower(dentry); |
615 | if (!lower_dentry->d_inode->i_op || | 615 | if (!lower_dentry->d_inode->i_op->readlink) { |
616 | !lower_dentry->d_inode->i_op->readlink) { | ||
617 | rc = -EINVAL; | 616 | rc = -EINVAL; |
618 | goto out; | 617 | goto out; |
619 | } | 618 | } |