aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-03-17 18:25:59 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-15 15:06:57 -0400
commit2b0143b5c986be1ce8408b3aadc4709e0a94429d (patch)
tree98b1dee70f3d5d9ac9309f4638e41864ddcd0952 /fs/jfs
parentce0b16ddf18df35026164fda4a642ef10c01f442 (diff)
VFS: normal filesystems (and lustre): d_inode() annotations
that's the bulk of filesystem drivers dealing with inodes of their own Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/file.c2
-rw-r--r--fs/jfs/namei.c18
-rw-r--r--fs/jfs/symlink.c2
-rw-r--r--fs/jfs/xattr.c12
4 files changed, 17 insertions, 17 deletions
diff --git a/fs/jfs/file.c b/fs/jfs/file.c
index ae46788b9723..e98d39d75cf4 100644
--- a/fs/jfs/file.c
+++ b/fs/jfs/file.c
@@ -100,7 +100,7 @@ static int jfs_release(struct inode *inode, struct file *file)
100 100
101int jfs_setattr(struct dentry *dentry, struct iattr *iattr) 101int jfs_setattr(struct dentry *dentry, struct iattr *iattr)
102{ 102{
103 struct inode *inode = dentry->d_inode; 103 struct inode *inode = d_inode(dentry);
104 int rc; 104 int rc;
105 105
106 rc = inode_change_ok(inode, iattr); 106 rc = inode_change_ok(inode, iattr);
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 38fdc533f4ec..66db7bc0ed10 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -346,7 +346,7 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
346{ 346{
347 int rc; 347 int rc;
348 tid_t tid; /* transaction id */ 348 tid_t tid; /* transaction id */
349 struct inode *ip = dentry->d_inode; 349 struct inode *ip = d_inode(dentry);
350 ino_t ino; 350 ino_t ino;
351 struct component_name dname; 351 struct component_name dname;
352 struct inode *iplist[2]; 352 struct inode *iplist[2];
@@ -472,7 +472,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
472{ 472{
473 int rc; 473 int rc;
474 tid_t tid; /* transaction id */ 474 tid_t tid; /* transaction id */
475 struct inode *ip = dentry->d_inode; 475 struct inode *ip = d_inode(dentry);
476 ino_t ino; 476 ino_t ino;
477 struct component_name dname; /* object name */ 477 struct component_name dname; /* object name */
478 struct inode *iplist[2]; 478 struct inode *iplist[2];
@@ -791,7 +791,7 @@ static int jfs_link(struct dentry *old_dentry,
791{ 791{
792 int rc; 792 int rc;
793 tid_t tid; 793 tid_t tid;
794 struct inode *ip = old_dentry->d_inode; 794 struct inode *ip = d_inode(old_dentry);
795 ino_t ino; 795 ino_t ino;
796 struct component_name dname; 796 struct component_name dname;
797 struct btstack btstack; 797 struct btstack btstack;
@@ -879,7 +879,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
879 struct component_name dname; 879 struct component_name dname;
880 int ssize; /* source pathname size */ 880 int ssize; /* source pathname size */
881 struct btstack btstack; 881 struct btstack btstack;
882 struct inode *ip = dentry->d_inode; 882 struct inode *ip = d_inode(dentry);
883 unchar *i_fastsymlink; 883 unchar *i_fastsymlink;
884 s64 xlen = 0; 884 s64 xlen = 0;
885 int bmask = 0, xsize; 885 int bmask = 0, xsize;
@@ -1086,8 +1086,8 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1086 dquot_initialize(old_dir); 1086 dquot_initialize(old_dir);
1087 dquot_initialize(new_dir); 1087 dquot_initialize(new_dir);
1088 1088
1089 old_ip = old_dentry->d_inode; 1089 old_ip = d_inode(old_dentry);
1090 new_ip = new_dentry->d_inode; 1090 new_ip = d_inode(new_dentry);
1091 1091
1092 if ((rc = get_UCSname(&old_dname, old_dentry))) 1092 if ((rc = get_UCSname(&old_dname, old_dentry)))
1093 goto out1; 1093 goto out1;
@@ -1500,9 +1500,9 @@ struct dentry *jfs_get_parent(struct dentry *dentry)
1500 unsigned long parent_ino; 1500 unsigned long parent_ino;
1501 1501
1502 parent_ino = 1502 parent_ino =
1503 le32_to_cpu(JFS_IP(dentry->d_inode)->i_dtroot.header.idotdot); 1503 le32_to_cpu(JFS_IP(d_inode(dentry))->i_dtroot.header.idotdot);
1504 1504
1505 return d_obtain_alias(jfs_iget(dentry->d_inode->i_sb, parent_ino)); 1505 return d_obtain_alias(jfs_iget(d_inode(dentry)->i_sb, parent_ino));
1506} 1506}
1507 1507
1508const struct inode_operations jfs_dir_inode_operations = { 1508const struct inode_operations jfs_dir_inode_operations = {
@@ -1578,7 +1578,7 @@ static int jfs_ci_revalidate(struct dentry *dentry, unsigned int flags)
1578 * positive dentry isn't good idea. So it's unsupported like 1578 * positive dentry isn't good idea. So it's unsupported like
1579 * rename("filename", "FILENAME") for now. 1579 * rename("filename", "FILENAME") for now.
1580 */ 1580 */
1581 if (dentry->d_inode) 1581 if (d_really_is_positive(dentry))
1582 return 1; 1582 return 1;
1583 1583
1584 /* 1584 /*
diff --git a/fs/jfs/symlink.c b/fs/jfs/symlink.c
index 205b946d8e0d..80f42bcc4ef1 100644
--- a/fs/jfs/symlink.c
+++ b/fs/jfs/symlink.c
@@ -24,7 +24,7 @@
24 24
25static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd) 25static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
26{ 26{
27 char *s = JFS_IP(dentry->d_inode)->i_inline; 27 char *s = JFS_IP(d_inode(dentry))->i_inline;
28 nd_set_link(nd, s); 28 nd_set_link(nd, s);
29 return NULL; 29 return NULL;
30} 30}
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c
index 46325d5c34fc..48b15a6e5558 100644
--- a/fs/jfs/xattr.c
+++ b/fs/jfs/xattr.c
@@ -849,7 +849,7 @@ int __jfs_setxattr(tid_t tid, struct inode *inode, const char *name,
849int jfs_setxattr(struct dentry *dentry, const char *name, const void *value, 849int jfs_setxattr(struct dentry *dentry, const char *name, const void *value,
850 size_t value_len, int flags) 850 size_t value_len, int flags)
851{ 851{
852 struct inode *inode = dentry->d_inode; 852 struct inode *inode = d_inode(dentry);
853 struct jfs_inode_info *ji = JFS_IP(inode); 853 struct jfs_inode_info *ji = JFS_IP(inode);
854 int rc; 854 int rc;
855 tid_t tid; 855 tid_t tid;
@@ -872,7 +872,7 @@ int jfs_setxattr(struct dentry *dentry, const char *name, const void *value,
872 872
873 tid = txBegin(inode->i_sb, 0); 873 tid = txBegin(inode->i_sb, 0);
874 mutex_lock(&ji->commit_mutex); 874 mutex_lock(&ji->commit_mutex);
875 rc = __jfs_setxattr(tid, dentry->d_inode, name, value, value_len, 875 rc = __jfs_setxattr(tid, d_inode(dentry), name, value, value_len,
876 flags); 876 flags);
877 if (!rc) 877 if (!rc)
878 rc = txCommit(tid, 1, &inode, 0); 878 rc = txCommit(tid, 1, &inode, 0);
@@ -959,7 +959,7 @@ ssize_t jfs_getxattr(struct dentry *dentry, const char *name, void *data,
959 return -EOPNOTSUPP; 959 return -EOPNOTSUPP;
960 } 960 }
961 961
962 err = __jfs_getxattr(dentry->d_inode, name, data, buf_size); 962 err = __jfs_getxattr(d_inode(dentry), name, data, buf_size);
963 963
964 return err; 964 return err;
965} 965}
@@ -976,7 +976,7 @@ static inline int can_list(struct jfs_ea *ea)
976 976
977ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size) 977ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size)
978{ 978{
979 struct inode *inode = dentry->d_inode; 979 struct inode *inode = d_inode(dentry);
980 char *buffer; 980 char *buffer;
981 ssize_t size = 0; 981 ssize_t size = 0;
982 int xattr_size; 982 int xattr_size;
@@ -1029,7 +1029,7 @@ ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size)
1029 1029
1030int jfs_removexattr(struct dentry *dentry, const char *name) 1030int jfs_removexattr(struct dentry *dentry, const char *name)
1031{ 1031{
1032 struct inode *inode = dentry->d_inode; 1032 struct inode *inode = d_inode(dentry);
1033 struct jfs_inode_info *ji = JFS_IP(inode); 1033 struct jfs_inode_info *ji = JFS_IP(inode);
1034 int rc; 1034 int rc;
1035 tid_t tid; 1035 tid_t tid;
@@ -1047,7 +1047,7 @@ int jfs_removexattr(struct dentry *dentry, const char *name)
1047 1047
1048 tid = txBegin(inode->i_sb, 0); 1048 tid = txBegin(inode->i_sb, 0);
1049 mutex_lock(&ji->commit_mutex); 1049 mutex_lock(&ji->commit_mutex);
1050 rc = __jfs_setxattr(tid, dentry->d_inode, name, NULL, 0, XATTR_REPLACE); 1050 rc = __jfs_setxattr(tid, d_inode(dentry), name, NULL, 0, XATTR_REPLACE);
1051 if (!rc) 1051 if (!rc)
1052 rc = txCommit(tid, 1, &inode, 0); 1052 rc = txCommit(tid, 1, &inode, 0);
1053 txEnd(tid); 1053 txEnd(tid);