aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_sysctl.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-03-17 18:25:59 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-15 15:06:57 -0400
commit2b0143b5c986be1ce8408b3aadc4709e0a94429d (patch)
tree98b1dee70f3d5d9ac9309f4638e41864ddcd0952 /fs/proc/proc_sysctl.c
parentce0b16ddf18df35026164fda4a642ef10c01f442 (diff)
VFS: normal filesystems (and lustre): d_inode() annotations
that's the bulk of filesystem drivers dealing with inodes of their own Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/proc_sysctl.c')
-rw-r--r--fs/proc/proc_sysctl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index f92d5dd578a4..fea2561d773b 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -604,7 +604,7 @@ static bool proc_sys_fill_cache(struct file *file,
604 return false; 604 return false;
605 } 605 }
606 } 606 }
607 inode = child->d_inode; 607 inode = d_inode(child);
608 ino = inode->i_ino; 608 ino = inode->i_ino;
609 type = inode->i_mode >> 12; 609 type = inode->i_mode >> 12;
610 dput(child); 610 dput(child);
@@ -710,7 +710,7 @@ static int proc_sys_permission(struct inode *inode, int mask)
710 710
711static int proc_sys_setattr(struct dentry *dentry, struct iattr *attr) 711static int proc_sys_setattr(struct dentry *dentry, struct iattr *attr)
712{ 712{
713 struct inode *inode = dentry->d_inode; 713 struct inode *inode = d_inode(dentry);
714 int error; 714 int error;
715 715
716 if (attr->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)) 716 if (attr->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID))
@@ -727,7 +727,7 @@ static int proc_sys_setattr(struct dentry *dentry, struct iattr *attr)
727 727
728static int proc_sys_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) 728static int proc_sys_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
729{ 729{
730 struct inode *inode = dentry->d_inode; 730 struct inode *inode = d_inode(dentry);
731 struct ctl_table_header *head = grab_header(inode); 731 struct ctl_table_header *head = grab_header(inode);
732 struct ctl_table *table = PROC_I(inode)->sysctl_entry; 732 struct ctl_table *table = PROC_I(inode)->sysctl_entry;
733 733
@@ -773,12 +773,12 @@ static int proc_sys_revalidate(struct dentry *dentry, unsigned int flags)
773{ 773{
774 if (flags & LOOKUP_RCU) 774 if (flags & LOOKUP_RCU)
775 return -ECHILD; 775 return -ECHILD;
776 return !PROC_I(dentry->d_inode)->sysctl->unregistering; 776 return !PROC_I(d_inode(dentry))->sysctl->unregistering;
777} 777}
778 778
779static int proc_sys_delete(const struct dentry *dentry) 779static int proc_sys_delete(const struct dentry *dentry)
780{ 780{
781 return !!PROC_I(dentry->d_inode)->sysctl->unregistering; 781 return !!PROC_I(d_inode(dentry))->sysctl->unregistering;
782} 782}
783 783
784static int sysctl_is_seen(struct ctl_table_header *p) 784static int sysctl_is_seen(struct ctl_table_header *p)
@@ -805,7 +805,7 @@ static int proc_sys_compare(const struct dentry *parent, const struct dentry *de
805 /* Although proc doesn't have negative dentries, rcu-walk means 805 /* Although proc doesn't have negative dentries, rcu-walk means
806 * that inode here can be NULL */ 806 * that inode here can be NULL */
807 /* AV: can it, indeed? */ 807 /* AV: can it, indeed? */
808 inode = ACCESS_ONCE(dentry->d_inode); 808 inode = d_inode_rcu(dentry);
809 if (!inode) 809 if (!inode)
810 return 1; 810 return 1;
811 if (name->len != len) 811 if (name->len != len)