Skip to content

Commit df2b1af

Browse files
dhowellsAl Viro
authored andcommitted
VFS: fs/inode.c helpers: d_inode() annotations
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>
1 parent 466b77b commit df2b1af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/inode.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags)
15871587
void touch_atime(const struct path *path)
15881588
{
15891589
struct vfsmount *mnt = path->mnt;
1590-
struct inode *inode = path->dentry->d_inode;
1590+
struct inode *inode = d_inode(path->dentry);
15911591
struct timespec now;
15921592

15931593
if (inode->i_flags & S_NOATIME)
@@ -1639,7 +1639,7 @@ EXPORT_SYMBOL(touch_atime);
16391639
*/
16401640
int should_remove_suid(struct dentry *dentry)
16411641
{
1642-
umode_t mode = dentry->d_inode->i_mode;
1642+
umode_t mode = d_inode(dentry)->i_mode;
16431643
int kill = 0;
16441644

16451645
/* suid always must be killed */
@@ -1675,7 +1675,7 @@ static int __remove_suid(struct dentry *dentry, int kill)
16751675
int file_remove_suid(struct file *file)
16761676
{
16771677
struct dentry *dentry = file->f_path.dentry;
1678-
struct inode *inode = dentry->d_inode;
1678+
struct inode *inode = d_inode(dentry);
16791679
int killsuid;
16801680
int killpriv;
16811681
int error = 0;

0 commit comments

Comments
 (0)