Re: [PATCH 25/30] libxfs: fix root inode handling inconsistencies

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

 



On Wed, Oct 30, 2013 at 03:23:18AM -0700, Christoph Hellwig wrote:
> On Wed, Oct 30, 2013 at 03:31:16PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > When "mounting" a filesystem via libxfs_mount(), callers can tell
> > libxfs to read the root and realtime inodes into cache. However,
> > when unmounting the filesystem, libxfs_unmount() used to
> > unconditionally free root inodes if they were present.
> > 
> > This leads to interesting issues like in mkfs, when it handles
> > creation, reading and freeing of the root and rt inodes itself.
> > It, however, passes in the flag to tell libxfs_mount() to read the
> > root inode, and so when unmounting throws an error like:
> > 
> > cache_node_put: node put on refcount 0 (node=0x684610)
> > 
> > When a second libxfs_iput() call is made on the root inode.
> > 
> > Clean this up and fix up all the callers that use magic numbers
> > rather than symbolic values to tell libxfs tomount the root inodes.
> 
> I think the right fix is to kill LIBXFS_MOUNT_ROOTINOS as nothing
> ever uses mp->m_rootip.

Good point - I never looked at the users of mp->m_rootip, so didn't
notice this. I'll redo this patch to kill LIBXFS_MOUNT_ROOTINOS.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux