aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfs')
-rw-r--r--fs/hfs/attr.c6
-rw-r--r--fs/hfs/dir.c8
-rw-r--r--fs/hfs/inode.c2
-rw-r--r--fs/hfs/sysdep.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/fs/hfs/attr.c b/fs/hfs/attr.c
index e057ec542a6a..8d931b157bbe 100644
--- a/fs/hfs/attr.c
+++ b/fs/hfs/attr.c
@@ -16,7 +16,7 @@
16int hfs_setxattr(struct dentry *dentry, const char *name, 16int hfs_setxattr(struct dentry *dentry, const char *name,
17 const void *value, size_t size, int flags) 17 const void *value, size_t size, int flags)
18{ 18{
19 struct inode *inode = dentry->d_inode; 19 struct inode *inode = d_inode(dentry);
20 struct hfs_find_data fd; 20 struct hfs_find_data fd;
21 hfs_cat_rec rec; 21 hfs_cat_rec rec;
22 struct hfs_cat_file *file; 22 struct hfs_cat_file *file;
@@ -59,7 +59,7 @@ out:
59ssize_t hfs_getxattr(struct dentry *dentry, const char *name, 59ssize_t hfs_getxattr(struct dentry *dentry, const char *name,
60 void *value, size_t size) 60 void *value, size_t size)
61{ 61{
62 struct inode *inode = dentry->d_inode; 62 struct inode *inode = d_inode(dentry);
63 struct hfs_find_data fd; 63 struct hfs_find_data fd;
64 hfs_cat_rec rec; 64 hfs_cat_rec rec;
65 struct hfs_cat_file *file; 65 struct hfs_cat_file *file;
@@ -105,7 +105,7 @@ out:
105 105
106ssize_t hfs_listxattr(struct dentry *dentry, char *buffer, size_t size) 106ssize_t hfs_listxattr(struct dentry *dentry, char *buffer, size_t size)
107{ 107{
108 struct inode *inode = dentry->d_inode; 108 struct inode *inode = d_inode(dentry);
109 109
110 if (!S_ISREG(inode->i_mode) || HFS_IS_RSRC(inode)) 110 if (!S_ISREG(inode->i_mode) || HFS_IS_RSRC(inode))
111 return -EOPNOTSUPP; 111 return -EOPNOTSUPP;
diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c
index 36d1a6ae7655..70788e03820a 100644
--- a/fs/hfs/dir.c
+++ b/fs/hfs/dir.c
@@ -253,7 +253,7 @@ static int hfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
253 */ 253 */
254static int hfs_remove(struct inode *dir, struct dentry *dentry) 254static int hfs_remove(struct inode *dir, struct dentry *dentry)
255{ 255{
256 struct inode *inode = dentry->d_inode; 256 struct inode *inode = d_inode(dentry);
257 int res; 257 int res;
258 258
259 if (S_ISDIR(inode->i_mode) && inode->i_size != 2) 259 if (S_ISDIR(inode->i_mode) && inode->i_size != 2)
@@ -285,18 +285,18 @@ static int hfs_rename(struct inode *old_dir, struct dentry *old_dentry,
285 int res; 285 int res;
286 286
287 /* Unlink destination if it already exists */ 287 /* Unlink destination if it already exists */
288 if (new_dentry->d_inode) { 288 if (d_really_is_positive(new_dentry)) {
289 res = hfs_remove(new_dir, new_dentry); 289 res = hfs_remove(new_dir, new_dentry);
290 if (res) 290 if (res)
291 return res; 291 return res;
292 } 292 }
293 293
294 res = hfs_cat_move(old_dentry->d_inode->i_ino, 294 res = hfs_cat_move(d_inode(old_dentry)->i_ino,
295 old_dir, &old_dentry->d_name, 295 old_dir, &old_dentry->d_name,
296 new_dir, &new_dentry->d_name); 296 new_dir, &new_dentry->d_name);
297 if (!res) 297 if (!res)
298 hfs_cat_build_key(old_dir->i_sb, 298 hfs_cat_build_key(old_dir->i_sb,
299 (btree_key *)&HFS_I(old_dentry->d_inode)->cat_key, 299 (btree_key *)&HFS_I(d_inode(old_dentry))->cat_key,
300 new_dir->i_ino, &new_dentry->d_name); 300 new_dir->i_ino, &new_dentry->d_name);
301 return res; 301 return res;
302} 302}
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index 75fd5d873c19..b99ebddb10cb 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -600,7 +600,7 @@ static int hfs_file_release(struct inode *inode, struct file *file)
600 600
601int hfs_inode_setattr(struct dentry *dentry, struct iattr * attr) 601int hfs_inode_setattr(struct dentry *dentry, struct iattr * attr)
602{ 602{
603 struct inode *inode = dentry->d_inode; 603 struct inode *inode = d_inode(dentry);
604 struct hfs_sb_info *hsb = HFS_SB(inode->i_sb); 604 struct hfs_sb_info *hsb = HFS_SB(inode->i_sb);
605 int error; 605 int error;
606 606
diff --git a/fs/hfs/sysdep.c b/fs/hfs/sysdep.c
index 91b91fd3a901..2875961fdc10 100644
--- a/fs/hfs/sysdep.c
+++ b/fs/hfs/sysdep.c
@@ -21,7 +21,7 @@ static int hfs_revalidate_dentry(struct dentry *dentry, unsigned int flags)
21 if (flags & LOOKUP_RCU) 21 if (flags & LOOKUP_RCU)
22 return -ECHILD; 22 return -ECHILD;
23 23
24 inode = dentry->d_inode; 24 inode = d_inode(dentry);
25 if(!inode) 25 if(!inode)
26 return 1; 26 return 1;
27 27