From 75c3cfa855dcedc84e7964269c9b6baf26137959 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 17 Mar 2015 22:26:12 +0000 Subject: VFS: assorted weird filesystems: d_inode() annotations Signed-off-by: David Howells Signed-off-by: Al Viro --- arch/s390/hypfs/inode.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'arch/s390/hypfs') diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 3f5c799b7fb5..d3f896a35b98 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c @@ -48,7 +48,7 @@ static struct dentry *hypfs_last_dentry; static void hypfs_update_update(struct super_block *sb) { struct hypfs_sb_info *sb_info = sb->s_fs_info; - struct inode *inode = sb_info->update_file->d_inode; + struct inode *inode = d_inode(sb_info->update_file); sb_info->last_update = get_seconds(); inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; @@ -64,7 +64,7 @@ static void hypfs_add_dentry(struct dentry *dentry) static inline int hypfs_positive(struct dentry *dentry) { - return dentry->d_inode && !d_unhashed(dentry); + return d_really_is_positive(dentry) && !d_unhashed(dentry); } static void hypfs_remove(struct dentry *dentry) @@ -72,16 +72,16 @@ static void hypfs_remove(struct dentry *dentry) struct dentry *parent; parent = dentry->d_parent; - mutex_lock(&parent->d_inode->i_mutex); + mutex_lock(&d_inode(parent)->i_mutex); if (hypfs_positive(dentry)) { if (d_is_dir(dentry)) - simple_rmdir(parent->d_inode, dentry); + simple_rmdir(d_inode(parent), dentry); else - simple_unlink(parent->d_inode, dentry); + simple_unlink(d_inode(parent), dentry); } d_delete(dentry); dput(dentry); - mutex_unlock(&parent->d_inode->i_mutex); + mutex_unlock(&d_inode(parent)->i_mutex); } static void hypfs_delete_tree(struct dentry *root) @@ -336,7 +336,7 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, struct dentry *dentry; struct inode *inode; - mutex_lock(&parent->d_inode->i_mutex); + mutex_lock(&d_inode(parent)->i_mutex); dentry = lookup_one_len(name, parent, strlen(name)); if (IS_ERR(dentry)) { dentry = ERR_PTR(-ENOMEM); @@ -357,14 +357,14 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, } else if (S_ISDIR(mode)) { inode->i_op = &simple_dir_inode_operations; inode->i_fop = &simple_dir_operations; - inc_nlink(parent->d_inode); + inc_nlink(d_inode(parent)); } else BUG(); inode->i_private = data; d_instantiate(dentry, inode); dget(dentry); fail: - mutex_unlock(&parent->d_inode->i_mutex); + mutex_unlock(&d_inode(parent)->i_mutex); return dentry; } -- cgit