mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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
This commit is contained in:
commit
520c853466
58 changed files with 126 additions and 219 deletions
|
|
@ -275,18 +275,9 @@ static int ecryptfs_release(struct inode *inode, struct file *file)
|
|||
static int
|
||||
ecryptfs_fsync(struct file *file, struct dentry *dentry, int datasync)
|
||||
{
|
||||
struct file *lower_file = ecryptfs_file_to_lower(file);
|
||||
struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
|
||||
struct inode *lower_inode = lower_dentry->d_inode;
|
||||
int rc = -EINVAL;
|
||||
|
||||
if (lower_inode->i_fop->fsync) {
|
||||
mutex_lock(&lower_inode->i_mutex);
|
||||
rc = lower_inode->i_fop->fsync(lower_file, lower_dentry,
|
||||
datasync);
|
||||
mutex_unlock(&lower_inode->i_mutex);
|
||||
}
|
||||
return rc;
|
||||
return vfs_fsync(ecryptfs_file_to_lower(file),
|
||||
ecryptfs_dentry_to_lower(dentry),
|
||||
datasync);
|
||||
}
|
||||
|
||||
static int ecryptfs_fasync(int fd, struct file *file, int flag)
|
||||
|
|
|
|||
|
|
@ -612,8 +612,7 @@ ecryptfs_readlink(struct dentry *dentry, char __user * buf, int bufsiz)
|
|||
struct ecryptfs_crypt_stat *crypt_stat;
|
||||
|
||||
lower_dentry = ecryptfs_dentry_to_lower(dentry);
|
||||
if (!lower_dentry->d_inode->i_op ||
|
||||
!lower_dentry->d_inode->i_op->readlink) {
|
||||
if (!lower_dentry->d_inode->i_op->readlink) {
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue