diff options
author | Matthew Garrett <mjg@redhat.com> | 2012-03-13 12:10:34 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-20 21:29:52 -0400 |
commit | f3922382ce930e76773fb06416a7a6081a8702ad (patch) | |
tree | 41de4a013a7d0686403da8a37880644cc3390b81 /fs/hfsplus | |
parent | 7cd916f6ea86e8538b1e8136847dfb941813fe94 (diff) |
hfsplus: initialise userflags
The userflags field was being written to the filesystem without being
initialised. Make sure it's clear, since otherwise files end up with
garbage attributes.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hfsplus')
-rw-r--r-- | fs/hfsplus/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 6643b242bdd7..82b69ee4dacc 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -193,6 +193,7 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir, | |||
193 | mutex_init(&hip->extents_lock); | 193 | mutex_init(&hip->extents_lock); |
194 | hip->extent_state = 0; | 194 | hip->extent_state = 0; |
195 | hip->flags = 0; | 195 | hip->flags = 0; |
196 | hip->userflags = 0; | ||
196 | set_bit(HFSPLUS_I_RSRC, &hip->flags); | 197 | set_bit(HFSPLUS_I_RSRC, &hip->flags); |
197 | 198 | ||
198 | err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); | 199 | err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); |
@@ -400,6 +401,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, umode_t mode) | |||
400 | atomic_set(&hip->opencnt, 0); | 401 | atomic_set(&hip->opencnt, 0); |
401 | hip->extent_state = 0; | 402 | hip->extent_state = 0; |
402 | hip->flags = 0; | 403 | hip->flags = 0; |
404 | hip->userflags = 0; | ||
403 | memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec)); | 405 | memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec)); |
404 | memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec)); | 406 | memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec)); |
405 | hip->alloc_blocks = 0; | 407 | hip->alloc_blocks = 0; |