mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -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
|
|
@ -57,9 +57,6 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
|
|||
}
|
||||
|
||||
inode->i_mode = mode;
|
||||
inode->i_uid = 0;
|
||||
inode->i_gid = 0;
|
||||
inode->i_blocks = 0;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_private = data;
|
||||
if ((mode & S_IFMT) == S_IFDIR) {
|
||||
|
|
|
|||
|
|
@ -111,8 +111,6 @@ capifs_fill_super(struct super_block *s, void *data, int silent)
|
|||
goto fail;
|
||||
inode->i_ino = 1;
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_blocks = 0;
|
||||
inode->i_uid = inode->i_gid = 0;
|
||||
inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
|
||||
inode->i_op = &simple_dir_inode_operations;
|
||||
inode->i_fop = &simple_dir_operations;
|
||||
|
|
|
|||
|
|
@ -146,8 +146,6 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
|
|||
|
||||
if (ret) {
|
||||
ret->i_mode = mode;
|
||||
ret->i_uid = ret->i_gid = 0;
|
||||
ret->i_blocks = 0;
|
||||
ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
|
||||
}
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@ static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode)
|
|||
|
||||
if (inode) {
|
||||
inode->i_mode = mode;
|
||||
inode->i_uid = 0;
|
||||
inode->i_gid = 0;
|
||||
inode->i_blocks = 0;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
}
|
||||
return inode;
|
||||
|
|
|
|||
|
|
@ -279,7 +279,6 @@ static struct inode *usbfs_get_inode (struct super_block *sb, int mode, dev_t de
|
|||
inode->i_mode = mode;
|
||||
inode->i_uid = current_fsuid();
|
||||
inode->i_gid = current_fsgid();
|
||||
inode->i_blocks = 0;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
switch (mode & S_IFMT) {
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -1863,26 +1863,10 @@ static int do_write(struct fsg_dev *fsg)
|
|||
static int fsync_sub(struct lun *curlun)
|
||||
{
|
||||
struct file *filp = curlun->filp;
|
||||
struct inode *inode;
|
||||
int rc, err;
|
||||
|
||||
if (curlun->ro || !filp)
|
||||
return 0;
|
||||
if (!filp->f_op->fsync)
|
||||
return -EINVAL;
|
||||
|
||||
inode = filp->f_path.dentry->d_inode;
|
||||
mutex_lock(&inode->i_mutex);
|
||||
rc = filemap_fdatawrite(inode->i_mapping);
|
||||
err = filp->f_op->fsync(filp, filp->f_path.dentry, 1);
|
||||
if (!rc)
|
||||
rc = err;
|
||||
err = filemap_fdatawait(inode->i_mapping);
|
||||
if (!rc)
|
||||
rc = err;
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
VLDBG(curlun, "fdatasync -> %d\n", rc);
|
||||
return rc;
|
||||
return vfs_fsync(filp, filp->f_path.dentry, 1);
|
||||
}
|
||||
|
||||
static void fsync_all(struct fsg_dev *fsg)
|
||||
|
|
|
|||
|
|
@ -2001,7 +2001,6 @@ gadgetfs_make_inode (struct super_block *sb,
|
|||
inode->i_mode = mode;
|
||||
inode->i_uid = default_uid;
|
||||
inode->i_gid = default_gid;
|
||||
inode->i_blocks = 0;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime
|
||||
= CURRENT_TIME;
|
||||
inode->i_private = data;
|
||||
|
|
|
|||
Loading…
Reference in a new issue