Re: [PATCH] FS: add_partition silently ignored errors

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Tuesday, November 6, 2007 - 2:38 pm

On Tue, 6 Nov 2007, Dirk Hohndel wrote:

I'd suggest keeping it in -mm for a while.

I worry about these kinds of "trivial" changes.  Quite often, some errors 
may be normal, and breaking out early can sometimes hurt more than it 
helps, in that it just makes things not even limp along. That said, with 
the disk/partition size check removed, this looks more palatable.


However, this is just ugly. The thing is not only apparently totally 
untested, since it is missing a semicolon, it should also just read

	err = add_partition(disk, part, start, length, ADDPART_FLAG_NONE);
	mutex_unlock(&bdev->bd_mutex);
	return err;

without any unnecessary conditionals (or ugly line-breaks, for that 
matter).


Wouldn't this be better done as

	if (err)
		goto out_unlink_cleanup;

to match the rest of the error handling?

			Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] add_partition silently ignored errors, Dirk Hohndel, (Mon Oct 29, 5:22 am)
Re: [PATCH] add_partition silently ignored errors, Cornelia Huck, (Mon Oct 29, 6:06 am)
Re: [PATCH] add_partition silently ignored errors, Dirk Hohndel, (Mon Oct 29, 7:24 am)
Re: [PATCH] add_partition silently ignored errors, Cornelia Huck, (Mon Oct 29, 7:43 am)
Re: [PATCH] add_partition silently ignored errors, Dirk Hohndel, (Mon Oct 29, 8:48 am)
Re: [PATCH] add_partition silently ignored errors, Cornelia Huck, (Mon Oct 29, 9:47 am)
Re: [PATCH] add_partition silently ignored errors, Jens Axboe, (Tue Oct 30, 1:07 am)
Re: [PATCH] add_partition silently ignored errors, Cornelia Huck, (Tue Oct 30, 2:09 am)
Re: [PATCH] add_partition silently ignored errors, Dirk Hohndel, (Tue Oct 30, 9:56 am)
Re: [PATCH] add_partition silently ignored errors, Cornelia Huck, (Tue Oct 30, 10:31 am)
Re: [PATCH] add_partition silently ignored errors, Dirk Hohndel, (Tue Oct 30, 3:56 pm)
Re: [PATCH] add_partition silently ignored errors, Cornelia Huck, (Wed Oct 31, 2:45 am)
Re: [PATCH] add_partition silently ignored errors, Jens Axboe, (Fri Nov 2, 6:04 am)
Re: [PATCH] add_partition silently ignored errors, Dirk Hohndel, (Fri Nov 2, 12:29 pm)
Re: [PATCH] add_partition silently ignored errors, Bob Copeland, (Fri Nov 2, 12:50 pm)
Re: [PATCH] add_partition silently ignored errors, Dirk Hohndel, (Fri Nov 2, 1:29 pm)
[PATCH] FS: add_partition silently ignored errors, Dirk Hohndel, (Tue Nov 6, 1:02 pm)
Re: [PATCH] FS: add_partition silently ignored errors, Linus Torvalds, (Tue Nov 6, 2:38 pm)