aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@tuxera.com>2010-09-30 23:44:02 -0400
committerChristoph Hellwig <hch@lst.de>2010-09-30 23:44:02 -0400
commit58a818f532e83f337689358c102ba2048d1b37f5 (patch)
tree8cd9f322a93423affb9acec6fac3547c7232de5c /fs/hfsplus
parent66e5db05bb6670f314d90aba5998e6a033e4d563 (diff)
hfsplus: remove the rsrc_inodes list
We never walk the list - the only reason for it is to make the resource fork inodes appear hashed to the writeback code. Borrow a trick from JFS to do that without needing a list head. Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/hfsplus_fs.h2
-rw-r--r--fs/hfsplus/inode.c10
-rw-r--r--fs/hfsplus/super.c1
3 files changed, 9 insertions, 4 deletions
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index 5e2418a71887..0cd9ba00f968 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -145,8 +145,6 @@ struct hfsplus_sb_info {
145 int part, session; 145 int part, session;
146 146
147 unsigned long flags; 147 unsigned long flags;
148
149 struct hlist_head rsrc_inodes;
150}; 148};
151 149
152#define HFSPLUS_SB_WRITEBACKUP 0x0001 150#define HFSPLUS_SB_WRITEBACKUP 0x0001
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index 309defb4f41f..a05b3afa7230 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -204,7 +204,15 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir, struct dentry *dent
204 hip->rsrc_inode = dir; 204 hip->rsrc_inode = dir;
205 HFSPLUS_I(dir)->rsrc_inode = inode; 205 HFSPLUS_I(dir)->rsrc_inode = inode;
206 igrab(dir); 206 igrab(dir);
207 hlist_add_head(&inode->i_hash, &HFSPLUS_SB(sb)->rsrc_inodes); 207
208 /*
209 * __mark_inode_dirty expects inodes to be hashed. Since we don't
210 * want resource fork inodes in the regular inode space, we make them
211 * appear hashed, but do not put on any lists. hlist_del()
212 * will work fine and require no locking.
213 */
214 inode->i_hash.pprev = &inode->i_hash.next;
215
208 mark_inode_dirty(inode); 216 mark_inode_dirty(inode);
209out: 217out:
210 d_add(dentry, inode); 218 d_add(dentry, inode);
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index f310a1fdcd5f..923f385b32ca 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -318,7 +318,6 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
318 return -ENOMEM; 318 return -ENOMEM;
319 319
320 sb->s_fs_info = sbi; 320 sb->s_fs_info = sbi;
321 INIT_HLIST_HEAD(&sbi->rsrc_inodes);
322 mutex_init(&sbi->alloc_mutex); 321 mutex_init(&sbi->alloc_mutex);
323 hfsplus_fill_defaults(sbi); 322 hfsplus_fill_defaults(sbi);
324 if (!hfsplus_parse_options(data, sbi)) { 323 if (!hfsplus_parse_options(data, sbi)) {