From: =?iso-8859-1?Q?J=F6rn?= Engel Subject: Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability Date: Tue, 7 Nov 2006 19:01:27 +0100 Message-ID: <20061107180127.GC29746@wohnheim.fh-wedel.de> References: <20061106182222.GO27140@parisc-linux.org> <1162838843.12129.8.camel@dantu.rdu.redhat.com> <20061106202313.GA691@wohnheim.fh-wedel.de> <454FA032.1070008@redhat.com> <20061106211134.GB691@wohnheim.fh-wedel.de> <454FAAF8.8080707@redhat.com> <1162914966.28425.24.camel@dantu.rdu.redhat.com> <20061107172835.GB15629@wohnheim.fh-wedel.de> <20061107174217.GA29746@wohnheim.fh-wedel.de> <20061107175601.GB29746@wohnheim.fh-wedel.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Eric Sandeen , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Return-path: To: Jeff Layton Content-Disposition: inline In-Reply-To: <20061107175601.GB29746@wohnheim.fh-wedel.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org And the last one is xfs_mapping_buftarg(). I am completely at a loss. As far as I can tell, inode allocated, partially initiated and - leaked. Am I missing something? STATIC int xfs_mapping_buftarg( xfs_buftarg_t *btp, struct block_device *bdev) { struct backing_dev_info *bdi; struct inode *inode; struct address_space *mapping; static const struct address_space_operations mapping_aops =3D { .sync_page =3D block_sync_page, .migratepage =3D fail_migrate_page, }; inode =3D new_inode(bdev->bd_inode->i_sb); if (!inode) { printk(KERN_WARNING "XFS: Cannot allocate mapping inode for device %s\n", XFS_BUFTARG_NAME(btp)); return ENOMEM; } inode->i_mode =3D S_IFBLK; inode->i_bdev =3D bdev; inode->i_rdev =3D bdev->bd_dev; bdi =3D blk_get_backing_dev_info(bdev); if (!bdi) bdi =3D &default_backing_dev_info; mapping =3D &inode->i_data; mapping->a_ops =3D &mapping_aops; mapping->backing_dev_info =3D bdi; mapping_set_gfp_mask(mapping, GFP_NOFS); btp->bt_mapping =3D mapping; return 0; } J=F6rn --=20 Those who come seeking peace without a treaty are plotting. -- Sun Tzu