Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jörn Engel wrote:
> 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?

It's not leaked... the new inode's mapping is saved in the buftarg:

 	btp->bt_mapping = mapping;

and then eventually the inode is put/freed in xfs_free_buftarg():

        iput(btp->bt_mapping->host);

The inode's mapping itself is used in several places:

  File                    Function              Line
0 xfs/linux-2.6/xfs_buf.h <global>                84 struct address_space *bt_mapping;
1 xfs/linux-2.6/xfs_buf.c _xfs_buf_lookup_pages  345 struct address_space *mapping = bp->b_target->bt_mapping;
2 xfs/linux-2.6/xfs_buf.c xfs_buf_readahead      671 bdi = target->bt_mapping->backing_dev_info;
3 xfs/linux-2.6/xfs_buf.c xfs_buf_lock           906 blk_run_address_space(bp->b_target->bt_mapping);
4 xfs/linux-2.6/xfs_buf.c xfs_buf_wait_unpin     978 blk_run_address_space(bp->b_target->bt_mapping);
5 xfs/linux-2.6/xfs_buf.c xfs_buf_iowait        1291 blk_run_address_space(bp->b_target->bt_mapping);
6 xfs/linux-2.6/xfs_buf.c xfs_free_buftarg      1451 iput(btp->bt_mapping->host);
7 xfs/linux-2.6/xfs_buf.c xfs_mapping_buftarg   1545 btp->bt_mapping = mapping;
8 xfs/linux-2.6/xfs_buf.c xfsbufd               1728 blk_run_address_space(target->bt_mapping);
9 xfs/linux-2.6/xfs_buf.c xfs_flush_buftarg     1801 blk_run_address_space(target->bt_mapping);

-Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux