On Mon, 4 Jun 2012 09:03:57 +0800 majianpeng <majianpeng@xxxxxxxxx> wrote: > On Sun, 3 Jun 2012 14:11:41 -0700, Dan Williams wrote: > >On Sat, Jun 2, 2012 at 1:16 AM, majianpeng <majianpeng@xxxxxxxxx> wrote: > >> Remove the judgement "bio_data_dir(bi) != WRITE" in md_write_start().Put > >> it before call md_write_start. > >> > >> Signed-off-by: majianpeng <majianpeng@xxxxxxxxx> > >> --- > >> ?drivers/md/md.c ? ? | ? ?4 +--- > >> ?drivers/md/md.h ? ? | ? ?2 +- > >> ?drivers/md/raid1.c ?| ? ?4 ++-- > >> ?drivers/md/raid10.c | ? ?3 ++- > >> ?drivers/md/raid5.c ?| ? ?3 ++- > >> ?5 files changed, 8 insertions(+), 8 deletions(-) > > > >If the deletions had outnumbered the insertions then maybe, but I > >think just like kfree() allowing NULL pointers it's cleaner if the > >caller need not worry. > > > >-- > >Dan > The patch had a anthor reason: first check,if read so not call function. > Call function takes long time than check statment. > This is micro-optimisation that really isn't worth spending any time on. NeilBrown
Attachment:
signature.asc
Description: PGP signature