052403b
From f3922382ce930e76773fb06416a7a6081a8702ad Mon Sep 17 00:00:00 2001
052403b
From: Matthew Garrett <mjg@redhat.com>
052403b
Date: Tue, 13 Mar 2012 12:10:34 -0400
052403b
Subject: [PATCH] hfsplus: initialise userflags
052403b
052403b
The userflags field was being written to the filesystem without being
052403b
initialised. Make sure it's clear, since otherwise files end up with
052403b
garbage attributes.
052403b
052403b
Signed-off-by: Matthew Garrett <mjg@redhat.com>
052403b
Signed-off-by: Christoph Hellwig <hch@lst.de>
052403b
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
052403b
---
052403b
 fs/hfsplus/inode.c |    2 ++
052403b
 1 files changed, 2 insertions(+), 0 deletions(-)
052403b
052403b
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
052403b
index 6643b24..82b69ee 100644
052403b
--- a/fs/hfsplus/inode.c
052403b
+++ b/fs/hfsplus/inode.c
052403b
@@ -193,6 +193,7 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir,
052403b
 	mutex_init(&hip->extents_lock);
052403b
 	hip->extent_state = 0;
052403b
 	hip->flags = 0;
052403b
+	hip->userflags = 0;
052403b
 	set_bit(HFSPLUS_I_RSRC, &hip->flags);
052403b
 
052403b
 	err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd;;
052403b
@@ -400,6 +401,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, umode_t mode)
052403b
 	atomic_set(&hip->opencnt, 0);
052403b
 	hip->extent_state = 0;
052403b
 	hip->flags = 0;
052403b
+	hip->userflags = 0;
052403b
 	memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec));
052403b
 	memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec));
052403b
 	hip->alloc_blocks = 0;
052403b
-- 
052403b
1.7.7.6
052403b