Skip to content

Commit

Permalink
VFS: fs/inode.c helpers: d_inode() annotations
Browse files Browse the repository at this point in the history
these should be used on objects already in top layer

Signed-off-by: David Howells <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
dhowells authored and Al Viro committed Apr 15, 2015
1 parent 466b77b commit df2b1af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit df2b1af

Please sign in to comment.