[PATCH] xfs: don't leak root inode reference
Al Viro
viro at ZenIV.linux.org.uk
Mon Aug 26 16:03:32 CDT 2013
On Mon, Aug 26, 2013 at 03:47:30PM -0500, Ben Myers wrote:
> Looks like in 48fde701 we removed the iput of the root inode in
> xfs_fs_fill_super for the error case. Add it back.
> if (is_bad_inode(root)) {
> error = EINVAL;
> - goto out_unmount;
> + goto out_iput;
This one makes sense
> }
> sb->s_root = d_make_root(root);
> if (!sb->s_root) {
> error = ENOMEM;
> - goto out_unmount;
> + goto out_iput;
... this one, OTOH, is simply wrong - take a look at what d_make_root()
does on failure.
More information about the xfs
mailing list