diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 18:48:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 20:22:07 -0400 |
commit | 9ec3a646fe09970f801ab15e0f1694060b9f19af (patch) | |
tree | 697058ca7e1671eda180a3ccc62445686fbc1a31 /ipc | |
parent | c8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff) | |
parent | 3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull fourth vfs update from Al Viro:
"d_inode() annotations from David Howells (sat in for-next since before
the beginning of merge window) + four assorted fixes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
RCU pathwalk breakage when running into a symlink overmounting something
fix I_DIO_WAKEUP definition
direct-io: only inc/dec inode->i_dio_count for file systems
fs/9p: fix readdir()
VFS: assorted d_backing_inode() annotations
VFS: fs/inode.c helpers: d_inode() annotations
VFS: fs/cachefiles: d_backing_inode() annotations
VFS: fs library helpers: d_inode() annotations
VFS: assorted weird filesystems: d_inode() annotations
VFS: normal filesystems (and lustre): d_inode() annotations
VFS: security/: d_inode() annotations
VFS: security/: d_backing_inode() annotations
VFS: net/: d_inode() annotations
VFS: net/unix: d_backing_inode() annotations
VFS: kernel/: d_inode() annotations
VFS: audit: d_backing_inode() annotations
VFS: Fix up some ->d_inode accesses in the chelsio driver
VFS: Cachefiles should perform fs modifications on the top layer only
VFS: AF_UNIX sockets should call mknod on the top layer only
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/mqueue.c | 22 | ||||
-rw-r--r-- | ipc/shm.c | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 7635a1cf99f3..3aaea7ffd077 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -466,7 +466,7 @@ out_unlock: | |||
466 | 466 | ||
467 | static int mqueue_unlink(struct inode *dir, struct dentry *dentry) | 467 | static int mqueue_unlink(struct inode *dir, struct dentry *dentry) |
468 | { | 468 | { |
469 | struct inode *inode = dentry->d_inode; | 469 | struct inode *inode = d_inode(dentry); |
470 | 470 | ||
471 | dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME; | 471 | dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME; |
472 | dir->i_size -= DIRENT_SIZE; | 472 | dir->i_size -= DIRENT_SIZE; |
@@ -770,7 +770,7 @@ static struct file *do_open(struct path *path, int oflag) | |||
770 | if ((oflag & O_ACCMODE) == (O_RDWR | O_WRONLY)) | 770 | if ((oflag & O_ACCMODE) == (O_RDWR | O_WRONLY)) |
771 | return ERR_PTR(-EINVAL); | 771 | return ERR_PTR(-EINVAL); |
772 | acc = oflag2acc[oflag & O_ACCMODE]; | 772 | acc = oflag2acc[oflag & O_ACCMODE]; |
773 | if (inode_permission(path->dentry->d_inode, acc)) | 773 | if (inode_permission(d_inode(path->dentry), acc)) |
774 | return ERR_PTR(-EACCES); | 774 | return ERR_PTR(-EACCES); |
775 | return dentry_open(path, oflag, current_cred()); | 775 | return dentry_open(path, oflag, current_cred()); |
776 | } | 776 | } |
@@ -802,7 +802,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode, | |||
802 | 802 | ||
803 | ro = mnt_want_write(mnt); /* we'll drop it in any case */ | 803 | ro = mnt_want_write(mnt); /* we'll drop it in any case */ |
804 | error = 0; | 804 | error = 0; |
805 | mutex_lock(&root->d_inode->i_mutex); | 805 | mutex_lock(&d_inode(root)->i_mutex); |
806 | path.dentry = lookup_one_len(name->name, root, strlen(name->name)); | 806 | path.dentry = lookup_one_len(name->name, root, strlen(name->name)); |
807 | if (IS_ERR(path.dentry)) { | 807 | if (IS_ERR(path.dentry)) { |
808 | error = PTR_ERR(path.dentry); | 808 | error = PTR_ERR(path.dentry); |
@@ -811,7 +811,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode, | |||
811 | path.mnt = mntget(mnt); | 811 | path.mnt = mntget(mnt); |
812 | 812 | ||
813 | if (oflag & O_CREAT) { | 813 | if (oflag & O_CREAT) { |
814 | if (path.dentry->d_inode) { /* entry already exists */ | 814 | if (d_really_is_positive(path.dentry)) { /* entry already exists */ |
815 | audit_inode(name, path.dentry, 0); | 815 | audit_inode(name, path.dentry, 0); |
816 | if (oflag & O_EXCL) { | 816 | if (oflag & O_EXCL) { |
817 | error = -EEXIST; | 817 | error = -EEXIST; |
@@ -824,12 +824,12 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode, | |||
824 | goto out; | 824 | goto out; |
825 | } | 825 | } |
826 | audit_inode_parent_hidden(name, root); | 826 | audit_inode_parent_hidden(name, root); |
827 | filp = do_create(ipc_ns, root->d_inode, | 827 | filp = do_create(ipc_ns, d_inode(root), |
828 | &path, oflag, mode, | 828 | &path, oflag, mode, |
829 | u_attr ? &attr : NULL); | 829 | u_attr ? &attr : NULL); |
830 | } | 830 | } |
831 | } else { | 831 | } else { |
832 | if (!path.dentry->d_inode) { | 832 | if (d_really_is_negative(path.dentry)) { |
833 | error = -ENOENT; | 833 | error = -ENOENT; |
834 | goto out; | 834 | goto out; |
835 | } | 835 | } |
@@ -848,7 +848,7 @@ out_putfd: | |||
848 | put_unused_fd(fd); | 848 | put_unused_fd(fd); |
849 | fd = error; | 849 | fd = error; |
850 | } | 850 | } |
851 | mutex_unlock(&root->d_inode->i_mutex); | 851 | mutex_unlock(&d_inode(root)->i_mutex); |
852 | if (!ro) | 852 | if (!ro) |
853 | mnt_drop_write(mnt); | 853 | mnt_drop_write(mnt); |
854 | out_putname: | 854 | out_putname: |
@@ -873,7 +873,7 @@ SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name) | |||
873 | err = mnt_want_write(mnt); | 873 | err = mnt_want_write(mnt); |
874 | if (err) | 874 | if (err) |
875 | goto out_name; | 875 | goto out_name; |
876 | mutex_lock_nested(&mnt->mnt_root->d_inode->i_mutex, I_MUTEX_PARENT); | 876 | mutex_lock_nested(&d_inode(mnt->mnt_root)->i_mutex, I_MUTEX_PARENT); |
877 | dentry = lookup_one_len(name->name, mnt->mnt_root, | 877 | dentry = lookup_one_len(name->name, mnt->mnt_root, |
878 | strlen(name->name)); | 878 | strlen(name->name)); |
879 | if (IS_ERR(dentry)) { | 879 | if (IS_ERR(dentry)) { |
@@ -881,17 +881,17 @@ SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name) | |||
881 | goto out_unlock; | 881 | goto out_unlock; |
882 | } | 882 | } |
883 | 883 | ||
884 | inode = dentry->d_inode; | 884 | inode = d_inode(dentry); |
885 | if (!inode) { | 885 | if (!inode) { |
886 | err = -ENOENT; | 886 | err = -ENOENT; |
887 | } else { | 887 | } else { |
888 | ihold(inode); | 888 | ihold(inode); |
889 | err = vfs_unlink(dentry->d_parent->d_inode, dentry, NULL); | 889 | err = vfs_unlink(d_inode(dentry->d_parent), dentry, NULL); |
890 | } | 890 | } |
891 | dput(dentry); | 891 | dput(dentry); |
892 | 892 | ||
893 | out_unlock: | 893 | out_unlock: |
894 | mutex_unlock(&mnt->mnt_root->d_inode->i_mutex); | 894 | mutex_unlock(&d_inode(mnt->mnt_root)->i_mutex); |
895 | if (inode) | 895 | if (inode) |
896 | iput(inode); | 896 | iput(inode); |
897 | mnt_drop_write(mnt); | 897 | mnt_drop_write(mnt); |
@@ -1132,7 +1132,7 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, | |||
1132 | path = shp->shm_file->f_path; | 1132 | path = shp->shm_file->f_path; |
1133 | path_get(&path); | 1133 | path_get(&path); |
1134 | shp->shm_nattch++; | 1134 | shp->shm_nattch++; |
1135 | size = i_size_read(path.dentry->d_inode); | 1135 | size = i_size_read(d_inode(path.dentry)); |
1136 | ipc_unlock_object(&shp->shm_perm); | 1136 | ipc_unlock_object(&shp->shm_perm); |
1137 | rcu_read_unlock(); | 1137 | rcu_read_unlock(); |
1138 | 1138 | ||