提交 df2b1afd 编写于 作者: D David Howells 提交者: Al Viro

VFS: fs/inode.c helpers: d_inode() annotations

these should be used on objects already in top layer
Signed-off-by: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 466b77bc
...@@ -1587,7 +1587,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags) ...@@ -1587,7 +1587,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags)
void touch_atime(const struct path *path) void touch_atime(const struct path *path)
{ {
struct vfsmount *mnt = path->mnt; struct vfsmount *mnt = path->mnt;
struct inode *inode = path->dentry->d_inode; struct inode *inode = d_inode(path->dentry);
struct timespec now; struct timespec now;
if (inode->i_flags & S_NOATIME) if (inode->i_flags & S_NOATIME)
...@@ -1639,7 +1639,7 @@ EXPORT_SYMBOL(touch_atime); ...@@ -1639,7 +1639,7 @@ EXPORT_SYMBOL(touch_atime);
*/ */
int should_remove_suid(struct dentry *dentry) 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; int kill = 0;
/* suid always must be killed */ /* suid always must be killed */
...@@ -1675,7 +1675,7 @@ static int __remove_suid(struct dentry *dentry, int kill) ...@@ -1675,7 +1675,7 @@ static int __remove_suid(struct dentry *dentry, int kill)
int file_remove_suid(struct file *file) int file_remove_suid(struct file *file)
{ {
struct dentry *dentry = file->f_path.dentry; struct dentry *dentry = file->f_path.dentry;
struct inode *inode = dentry->d_inode; struct inode *inode = d_inode(dentry);
int killsuid; int killsuid;
int killpriv; int killpriv;
int error = 0; int error = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册