From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Garrett Subject: [PATCH] hfsplus: Initialise userflags Date: Tue, 13 Mar 2012 12:10:34 -0400 Message-ID: <1331655034-3577-1-git-send-email-mjg@redhat.com> Cc: linux-fsdevel@vger.kernel.org, Matthew Garrett To: hch@infradead.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:15630 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753912Ab2CMQKz (ORCPT ); Tue, 13 Mar 2012 12:10:55 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 --- 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 6643b24..82b69ee 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c @@ -193,6 +193,7 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir, mutex_init(&hip->extents_lock); hip->extent_state = 0; hip->flags = 0; + hip->userflags = 0; set_bit(HFSPLUS_I_RSRC, &hip->flags); 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) atomic_set(&hip->opencnt, 0); hip->extent_state = 0; hip->flags = 0; + hip->userflags = 0; memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec)); memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec)); hip->alloc_blocks = 0; -- 1.7.7.6