]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
VFS: fs/inode.c helpers: d_inode() annotations
authorDavid Howells <dhowells@redhat.com>
Tue, 17 Mar 2015 22:26:15 +0000 (22:26 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 15 Apr 2015 19:06:59 +0000 (15:06 -0400)
these should be used on objects already in top layer

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/inode.c

index f00b16f4550781f3e658ebf2f9d8d00e3fd36f64..94886f9fbb0667dccc4ab1d1ca1dab27470375e0 100644 (file)
@@ -1587,7 +1587,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags)
 void touch_atime(const struct path *path)
 {
        struct vfsmount *mnt = path->mnt;
-       struct inode *inode = path->dentry->d_inode;
+       struct inode *inode = d_inode(path->dentry);
        struct timespec now;
 
        if (inode->i_flags & S_NOATIME)
@@ -1639,7 +1639,7 @@ EXPORT_SYMBOL(touch_atime);
  */
 int should_remove_suid(struct dentry *dentry)
 {
-       umode_t mode = dentry->d_inode->i_mode;
+       umode_t mode = d_inode(dentry)->i_mode;
        int kill = 0;
 
        /* suid always must be killed */
@@ -1675,7 +1675,7 @@ static int __remove_suid(struct dentry *dentry, int kill)
 int file_remove_suid(struct file *file)
 {
        struct dentry *dentry = file->f_path.dentry;
-       struct inode *inode = dentry->d_inode;
+       struct inode *inode = d_inode(dentry);
        int killsuid;
        int killpriv;
        int error = 0;