Re: [RFC][PATCH] simple_set_mnt() should return void

From: Christoph Hellwig
Date: Sun Feb 01 2009 - 11:33:10 EST


On Wed, Jan 28, 2009 at 10:30:01PM -0800, Sukadev Bhattiprolu wrote:
>
> From: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx>
> Date: Wed, 28 Jan 2009 17:11:13 -0800
> Subject: [RFC][PATCH] simple_set_mnt() should return void
>
> simple_set_mnt() is defined to return int but always returns 0.
> Callers assume simple_set_mnt() never fails and don't properly
> cleanup if it were to _ever_ fail. For instance, get_sb_single()
> and get_sb_nodev() should:
>
> up_write(sb->s_unmount);
> deactivate_super(sb);
>
> if simple_set_mnt() fails.
>
> Since simple_set_mnt() never fails, would be cleaner if it did
> not return anything.

Makes sense to me. Feel free to resend once you did an allmodconfig
or similar build.

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