From: Jan Kara Subject: [PATCH 10/17] udf: Use own optional list for metadata bhs Date: Fri, 2 May 2014 15:20:01 +0200 Message-ID: <1399036808-24521-11-git-send-email-jack@suse.cz> References: <1399036808-24521-1-git-send-email-jack@suse.cz> Cc: Al Viro , Jan Kara To: linux-fsdevel@vger.kernel.org Return-path: Received: from cantor2.suse.de ([195.135.220.15]:53369 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752474AbaEBNUP (ORCPT ); Fri, 2 May 2014 09:20:15 -0400 In-Reply-To: <1399036808-24521-1-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Jan Kara --- fs/udf/super.c | 7 +++++++ fs/udf/udf_i.h | 1 + 2 files changed, 8 insertions(+) diff --git a/fs/udf/super.c b/fs/udf/super.c index 3306b9f69bed..5db6af43a45b 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -81,6 +81,11 @@ enum { UDF_MAX_LINKS = 0xffff }; +static int udf_inode_fields[IF_FIELD_NR] = { + [IF_META_BHS] = (int)offsetof(struct udf_inode_info, i_mbh) - + (int)offsetof(struct udf_inode_info, vfs_inode), +}; + /* These are the "meat" - everything else is stuffing */ static int udf_fill_super(struct super_block *, void *, int); static void udf_put_super(struct super_block *); @@ -172,6 +177,7 @@ static void init_once(void *foo) struct udf_inode_info *ei = (struct udf_inode_info *)foo; ei->i_ext.i_data = NULL; + inode_mbhs_init_once(&ei->i_mbh); inode_init_once(&ei->vfs_inode); } @@ -2062,6 +2068,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) sb->s_fs_info = sbi; mutex_init(&sbi->s_alloc_mutex); + sb_init_inode_fields(sb, udf_inode_fields); if (!udf_parse_options((char *)options, &uopt, false)) goto error_out; diff --git a/fs/udf/udf_i.h b/fs/udf/udf_i.h index b5cd8ed2aa12..e75cf7d42765 100644 --- a/fs/udf/udf_i.h +++ b/fs/udf/udf_i.h @@ -51,6 +51,7 @@ struct udf_inode_info { struct udf_ext_cache cached_extent; /* Spinlock for protecting extent cache */ spinlock_t i_extent_cache_lock; + struct inode_meta_bhs i_mbh; struct inode vfs_inode; }; -- 1.8.1.4