aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 18:48:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 20:22:07 -0400
commit9ec3a646fe09970f801ab15e0f1694060b9f19af (patch)
tree697058ca7e1671eda180a3ccc62445686fbc1a31 /fs/proc/base.c
parentc8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff)
parent3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (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 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 7a3b82f986dd..093ca14f5701 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -169,7 +169,7 @@ static int get_task_root(struct task_struct *task, struct path *root)
169 169
170static int proc_cwd_link(struct dentry *dentry, struct path *path) 170static int proc_cwd_link(struct dentry *dentry, struct path *path)
171{ 171{
172 struct task_struct *task = get_proc_task(dentry->d_inode); 172 struct task_struct *task = get_proc_task(d_inode(dentry));
173 int result = -ENOENT; 173 int result = -ENOENT;
174 174
175 if (task) { 175 if (task) {
@@ -186,7 +186,7 @@ static int proc_cwd_link(struct dentry *dentry, struct path *path)
186 186
187static int proc_root_link(struct dentry *dentry, struct path *path) 187static int proc_root_link(struct dentry *dentry, struct path *path)
188{ 188{
189 struct task_struct *task = get_proc_task(dentry->d_inode); 189 struct task_struct *task = get_proc_task(d_inode(dentry));
190 int result = -ENOENT; 190 int result = -ENOENT;
191 191
192 if (task) { 192 if (task) {
@@ -514,7 +514,7 @@ static int proc_fd_access_allowed(struct inode *inode)
514int proc_setattr(struct dentry *dentry, struct iattr *attr) 514int proc_setattr(struct dentry *dentry, struct iattr *attr)
515{ 515{
516 int error; 516 int error;
517 struct inode *inode = dentry->d_inode; 517 struct inode *inode = d_inode(dentry);
518 518
519 if (attr->ia_valid & ATTR_MODE) 519 if (attr->ia_valid & ATTR_MODE)
520 return -EPERM; 520 return -EPERM;
@@ -1362,7 +1362,7 @@ static int proc_exe_link(struct dentry *dentry, struct path *exe_path)
1362 struct mm_struct *mm; 1362 struct mm_struct *mm;
1363 struct file *exe_file; 1363 struct file *exe_file;
1364 1364
1365 task = get_proc_task(dentry->d_inode); 1365 task = get_proc_task(d_inode(dentry));
1366 if (!task) 1366 if (!task)
1367 return -ENOENT; 1367 return -ENOENT;
1368 mm = get_task_mm(task); 1368 mm = get_task_mm(task);
@@ -1382,7 +1382,7 @@ static int proc_exe_link(struct dentry *dentry, struct path *exe_path)
1382 1382
1383static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) 1383static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
1384{ 1384{
1385 struct inode *inode = dentry->d_inode; 1385 struct inode *inode = d_inode(dentry);
1386 struct path path; 1386 struct path path;
1387 int error = -EACCES; 1387 int error = -EACCES;
1388 1388
@@ -1427,7 +1427,7 @@ static int do_proc_readlink(struct path *path, char __user *buffer, int buflen)
1427static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int buflen) 1427static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int buflen)
1428{ 1428{
1429 int error = -EACCES; 1429 int error = -EACCES;
1430 struct inode *inode = dentry->d_inode; 1430 struct inode *inode = d_inode(dentry);
1431 struct path path; 1431 struct path path;
1432 1432
1433 /* Are we allowed to snoop on the tasks file descriptors? */ 1433 /* Are we allowed to snoop on the tasks file descriptors? */
@@ -1497,7 +1497,7 @@ out_unlock:
1497 1497
1498int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) 1498int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
1499{ 1499{
1500 struct inode *inode = dentry->d_inode; 1500 struct inode *inode = d_inode(dentry);
1501 struct task_struct *task; 1501 struct task_struct *task;
1502 const struct cred *cred; 1502 const struct cred *cred;
1503 struct pid_namespace *pid = dentry->d_sb->s_fs_info; 1503 struct pid_namespace *pid = dentry->d_sb->s_fs_info;
@@ -1554,7 +1554,7 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
1554 if (flags & LOOKUP_RCU) 1554 if (flags & LOOKUP_RCU)
1555 return -ECHILD; 1555 return -ECHILD;
1556 1556
1557 inode = dentry->d_inode; 1557 inode = d_inode(dentry);
1558 task = get_proc_task(inode); 1558 task = get_proc_task(inode);
1559 1559
1560 if (task) { 1560 if (task) {
@@ -1588,7 +1588,7 @@ int pid_delete_dentry(const struct dentry *dentry)
1588 * If so, then don't put the dentry on the lru list, 1588 * If so, then don't put the dentry on the lru list,
1589 * kill it immediately. 1589 * kill it immediately.
1590 */ 1590 */
1591 return proc_inode_is_dead(dentry->d_inode); 1591 return proc_inode_is_dead(d_inode(dentry));
1592} 1592}
1593 1593
1594const struct dentry_operations pid_dentry_operations = 1594const struct dentry_operations pid_dentry_operations =
@@ -1626,12 +1626,12 @@ bool proc_fill_cache(struct file *file, struct dir_context *ctx,
1626 child = d_alloc(dir, &qname); 1626 child = d_alloc(dir, &qname);
1627 if (!child) 1627 if (!child)
1628 goto end_instantiate; 1628 goto end_instantiate;
1629 if (instantiate(dir->d_inode, child, task, ptr) < 0) { 1629 if (instantiate(d_inode(dir), child, task, ptr) < 0) {
1630 dput(child); 1630 dput(child);
1631 goto end_instantiate; 1631 goto end_instantiate;
1632 } 1632 }
1633 } 1633 }
1634 inode = child->d_inode; 1634 inode = d_inode(child);
1635 ino = inode->i_ino; 1635 ino = inode->i_ino;
1636 type = inode->i_mode >> 12; 1636 type = inode->i_mode >> 12;
1637 dput(child); 1637 dput(child);
@@ -1674,7 +1674,7 @@ static int map_files_d_revalidate(struct dentry *dentry, unsigned int flags)
1674 goto out_notask; 1674 goto out_notask;
1675 } 1675 }
1676 1676
1677 inode = dentry->d_inode; 1677 inode = d_inode(dentry);
1678 task = get_proc_task(inode); 1678 task = get_proc_task(inode);
1679 if (!task) 1679 if (!task)
1680 goto out_notask; 1680 goto out_notask;
@@ -1727,7 +1727,7 @@ static int proc_map_files_get_link(struct dentry *dentry, struct path *path)
1727 int rc; 1727 int rc;
1728 1728
1729 rc = -ENOENT; 1729 rc = -ENOENT;
1730 task = get_proc_task(dentry->d_inode); 1730 task = get_proc_task(d_inode(dentry));
1731 if (!task) 1731 if (!task)
1732 goto out; 1732 goto out;
1733 1733
@@ -2863,13 +2863,13 @@ int proc_pid_readdir(struct file *file, struct dir_context *ctx)
2863 return 0; 2863 return 0;
2864 2864
2865 if (pos == TGID_OFFSET - 2) { 2865 if (pos == TGID_OFFSET - 2) {
2866 struct inode *inode = ns->proc_self->d_inode; 2866 struct inode *inode = d_inode(ns->proc_self);
2867 if (!dir_emit(ctx, "self", 4, inode->i_ino, DT_LNK)) 2867 if (!dir_emit(ctx, "self", 4, inode->i_ino, DT_LNK))
2868 return 0; 2868 return 0;
2869 ctx->pos = pos = pos + 1; 2869 ctx->pos = pos = pos + 1;
2870 } 2870 }
2871 if (pos == TGID_OFFSET - 1) { 2871 if (pos == TGID_OFFSET - 1) {
2872 struct inode *inode = ns->proc_thread_self->d_inode; 2872 struct inode *inode = d_inode(ns->proc_thread_self);
2873 if (!dir_emit(ctx, "thread-self", 11, inode->i_ino, DT_LNK)) 2873 if (!dir_emit(ctx, "thread-self", 11, inode->i_ino, DT_LNK))
2874 return 0; 2874 return 0;
2875 ctx->pos = pos = pos + 1; 2875 ctx->pos = pos = pos + 1;
@@ -3188,7 +3188,7 @@ static int proc_task_readdir(struct file *file, struct dir_context *ctx)
3188 3188
3189static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) 3189static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
3190{ 3190{
3191 struct inode *inode = dentry->d_inode; 3191 struct inode *inode = d_inode(dentry);
3192 struct task_struct *p = get_proc_task(inode); 3192 struct task_struct *p = get_proc_task(inode);
3193 generic_fillattr(inode, stat); 3193 generic_fillattr(inode, stat);
3194 3194