diff options
author | Christoph Hellwig <hch@tuxera.com> | 2010-11-23 08:38:13 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2010-11-23 08:38:13 -0500 |
commit | b33b7921db14abcd10c30d0ccfc68e364f5ef7fe (patch) | |
tree | 208810679b25995ba47f00bb1915a19f644931f5 /fs/hfsplus/inode.c | |
parent | eb29d66d4f2dc98a81ae590bbdddc8cfa8964d73 (diff) |
hfsplus: split up inode flags
Split the flags field in the hfsplus inode into an extent_state
flag that is locked by the extent_lock, and a new flags field
that uses atomic bitops. The second will grow more flags in the
next patch.
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/inode.c')
-rw-r--r-- | fs/hfsplus/inode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 8cd8dc2e7fdd..0946e2cdca5e 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -190,7 +190,9 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir, struct dentry *dent | |||
190 | inode->i_ino = dir->i_ino; | 190 | inode->i_ino = dir->i_ino; |
191 | INIT_LIST_HEAD(&hip->open_dir_list); | 191 | INIT_LIST_HEAD(&hip->open_dir_list); |
192 | mutex_init(&hip->extents_lock); | 192 | mutex_init(&hip->extents_lock); |
193 | hip->flags = HFSPLUS_FLG_RSRC; | 193 | hip->extent_state = 0; |
194 | hip->flags = 0; | ||
195 | set_bit(HFSPLUS_I_RSRC, &hip->flags); | ||
194 | 196 | ||
195 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); | 197 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); |
196 | err = hfsplus_find_cat(sb, dir->i_ino, &fd); | 198 | err = hfsplus_find_cat(sb, dir->i_ino, &fd); |
@@ -369,6 +371,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, int mode) | |||
369 | INIT_LIST_HEAD(&hip->open_dir_list); | 371 | INIT_LIST_HEAD(&hip->open_dir_list); |
370 | mutex_init(&hip->extents_lock); | 372 | mutex_init(&hip->extents_lock); |
371 | atomic_set(&hip->opencnt, 0); | 373 | atomic_set(&hip->opencnt, 0); |
374 | hip->extent_state = 0; | ||
372 | hip->flags = 0; | 375 | hip->flags = 0; |
373 | memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec)); | 376 | memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec)); |
374 | memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec)); | 377 | memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec)); |
@@ -498,8 +501,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) | |||
498 | hfs_bnode_read(fd->bnode, &entry, fd->entryoffset, | 501 | hfs_bnode_read(fd->bnode, &entry, fd->entryoffset, |
499 | sizeof(struct hfsplus_cat_file)); | 502 | sizeof(struct hfsplus_cat_file)); |
500 | 503 | ||
501 | hfsplus_inode_read_fork(inode, HFSPLUS_IS_DATA(inode) ? | 504 | hfsplus_inode_read_fork(inode, HFSPLUS_IS_RSRC(inode) ? |
502 | &file->data_fork : &file->rsrc_fork); | 505 | &file->rsrc_fork : &file->data_fork); |
503 | hfsplus_get_perms(inode, &file->permissions, 0); | 506 | hfsplus_get_perms(inode, &file->permissions, 0); |
504 | inode->i_nlink = 1; | 507 | inode->i_nlink = 1; |
505 | if (S_ISREG(inode->i_mode)) { | 508 | if (S_ISREG(inode->i_mode)) { |