diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 18:26:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-15 15:06:58 -0400 |
commit | 75c3cfa855dcedc84e7964269c9b6baf26137959 (patch) | |
tree | 2ef6b8570069d7811542db376c88fbe208a5771d /arch/s390 | |
parent | 2b0143b5c986be1ce8408b3aadc4709e0a94429d (diff) |
VFS: assorted weird filesystems: d_inode() annotations
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/hypfs/inode.c | 18 |
1 files changed, 9 insertions, 9 deletions
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; | |||
48 | static void hypfs_update_update(struct super_block *sb) | 48 | static void hypfs_update_update(struct super_block *sb) |
49 | { | 49 | { |
50 | struct hypfs_sb_info *sb_info = sb->s_fs_info; | 50 | struct hypfs_sb_info *sb_info = sb->s_fs_info; |
51 | struct inode *inode = sb_info->update_file->d_inode; | 51 | struct inode *inode = d_inode(sb_info->update_file); |
52 | 52 | ||
53 | sb_info->last_update = get_seconds(); | 53 | sb_info->last_update = get_seconds(); |
54 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 54 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
@@ -64,7 +64,7 @@ static void hypfs_add_dentry(struct dentry *dentry) | |||
64 | 64 | ||
65 | static inline int hypfs_positive(struct dentry *dentry) | 65 | static inline int hypfs_positive(struct dentry *dentry) |
66 | { | 66 | { |
67 | return dentry->d_inode && !d_unhashed(dentry); | 67 | return d_really_is_positive(dentry) && !d_unhashed(dentry); |
68 | } | 68 | } |
69 | 69 | ||
70 | static void hypfs_remove(struct dentry *dentry) | 70 | static void hypfs_remove(struct dentry *dentry) |
@@ -72,16 +72,16 @@ static void hypfs_remove(struct dentry *dentry) | |||
72 | struct dentry *parent; | 72 | struct dentry *parent; |
73 | 73 | ||
74 | parent = dentry->d_parent; | 74 | parent = dentry->d_parent; |
75 | mutex_lock(&parent->d_inode->i_mutex); | 75 | mutex_lock(&d_inode(parent)->i_mutex); |
76 | if (hypfs_positive(dentry)) { | 76 | if (hypfs_positive(dentry)) { |
77 | if (d_is_dir(dentry)) | 77 | if (d_is_dir(dentry)) |
78 | simple_rmdir(parent->d_inode, dentry); | 78 | simple_rmdir(d_inode(parent), dentry); |
79 | else | 79 | else |
80 | simple_unlink(parent->d_inode, dentry); | 80 | simple_unlink(d_inode(parent), dentry); |
81 | } | 81 | } |
82 | d_delete(dentry); | 82 | d_delete(dentry); |
83 | dput(dentry); | 83 | dput(dentry); |
84 | mutex_unlock(&parent->d_inode->i_mutex); | 84 | mutex_unlock(&d_inode(parent)->i_mutex); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void hypfs_delete_tree(struct dentry *root) | 87 | static void hypfs_delete_tree(struct dentry *root) |
@@ -336,7 +336,7 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, | |||
336 | struct dentry *dentry; | 336 | struct dentry *dentry; |
337 | struct inode *inode; | 337 | struct inode *inode; |
338 | 338 | ||
339 | mutex_lock(&parent->d_inode->i_mutex); | 339 | mutex_lock(&d_inode(parent)->i_mutex); |
340 | dentry = lookup_one_len(name, parent, strlen(name)); | 340 | dentry = lookup_one_len(name, parent, strlen(name)); |
341 | if (IS_ERR(dentry)) { | 341 | if (IS_ERR(dentry)) { |
342 | dentry = ERR_PTR(-ENOMEM); | 342 | dentry = ERR_PTR(-ENOMEM); |
@@ -357,14 +357,14 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, | |||
357 | } else if (S_ISDIR(mode)) { | 357 | } else if (S_ISDIR(mode)) { |
358 | inode->i_op = &simple_dir_inode_operations; | 358 | inode->i_op = &simple_dir_inode_operations; |
359 | inode->i_fop = &simple_dir_operations; | 359 | inode->i_fop = &simple_dir_operations; |
360 | inc_nlink(parent->d_inode); | 360 | inc_nlink(d_inode(parent)); |
361 | } else | 361 | } else |
362 | BUG(); | 362 | BUG(); |
363 | inode->i_private = data; | 363 | inode->i_private = data; |
364 | d_instantiate(dentry, inode); | 364 | d_instantiate(dentry, inode); |
365 | dget(dentry); | 365 | dget(dentry); |
366 | fail: | 366 | fail: |
367 | mutex_unlock(&parent->d_inode->i_mutex); | 367 | mutex_unlock(&d_inode(parent)->i_mutex); |
368 | return dentry; | 368 | return dentry; |
369 | } | 369 | } |
370 | 370 | ||