public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Theodore Ts'o" <tytso@MIT.EDU>,
	linux-kernel@vger.kernel.org, Andy Whitcroft <apw@shadowen.org>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 30/49] ext4: Convert truncate_mutex to read write semaphore.
Date: Thu, 24 Jan 2008 10:59:07 +0530	[thread overview]
Message-ID: <20080124052907.GB7902@skywalker> (raw)
In-Reply-To: <20080123140659.5b70ae6b.akpm@linux-foundation.org>

On Wed, Jan 23, 2008 at 02:06:59PM -0800, Andrew Morton wrote:
> > On Mon, 21 Jan 2008 22:02:09 -0500 "Theodore Ts'o" <tytso@MIT.EDU> wrote:
> > +int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block,
> > +			unsigned long max_blocks, struct buffer_head *bh,
> > +			int create, int extend_disksize)
> > +{
> > +	int retval;
> > +	if (create) {
> > +		down_write((&EXT4_I(inode)->i_data_sem));
> > +	} else {
> > +		down_read((&EXT4_I(inode)->i_data_sem));
> > +	}
> > +	if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL) {
> > +		retval =  ext4_ext_get_blocks(handle, inode, block, max_blocks,
> > +				bh, create, extend_disksize);
> > +	} else {
> > +		retval = ext4_get_blocks_handle(handle, inode, block,
> > +				max_blocks, bh, create, extend_disksize);
> > +	}
> > +	if (create) {
> > +		up_write((&EXT4_I(inode)->i_data_sem));
> > +	} else {
> > +		up_read((&EXT4_I(inode)->i_data_sem));
> > +	}
> 
> This function has many unneeded braces.  checkpatch used to detect this
> but it seems to have broken.

The follow up patch "ext4: Take read lock during overwrite case" removes
those single line if statement.


> 
> > +	return retval;
> > +}
> >  static int ext4_get_block(struct inode *inode, sector_t iblock,
> >  			struct buffer_head *bh_result, int create)
> 
> Mising newline.

Fixed.

-aneesh

  reply	other threads:[~2008-01-24  5:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1200970948-17903-1-git-send-email-tytso@mit.edu>
     [not found] ` <1200970948-17903-2-git-send-email-tytso@mit.edu>
     [not found]   ` <1200970948-17903-3-git-send-email-tytso@mit.edu>
     [not found]     ` <1200970948-17903-4-git-send-email-tytso@mit.edu>
     [not found]       ` <1200970948-17903-5-git-send-email-tytso@mit.edu>
     [not found]         ` <1200970948-17903-6-git-send-email-tytso@mit.edu>
     [not found]           ` <1200970948-17903-7-git-send-email-tytso@mit.edu>
     [not found]             ` <1200970948-17903-8-git-send-email-tytso@mit.edu>
     [not found]               ` <1200970948-17903-9-git-send-email-tytso@mit.edu>
     [not found]                 ` <1200970948-17903-10-git-send-email-tytso@mit.edu>
     [not found]                   ` <1200970948-17903-11-git-send-email-tytso@mit.edu>
     [not found]                     ` <1200970948-17903-12-git-send-email-tytso@mit.edu>
     [not found]                       ` <1200970948-17903-13-git-send-email-tytso@mit.edu>
     [not found]                         ` <1200970948-17903-14-git-send-email-tytso@mit.edu>
     [not found]                           ` <1200970948-17903-15-git-send-email-tytso@mit.edu>
     [not found]                             ` <1200970948-17903-16-git-send-email-tytso@mit.edu>
     [not found]                               ` <1200970948-17903-17-git-send-email-tytso@mit.edu>
     [not found]                                 ` <1200970948-17903-18-git-send-email-tytso@mit.edu>
     [not found]                                   ` <1200970948-17903-19-git-send-email-tytso@mit.edu>
     [not found]                                     ` <1200970948-17903-20-git-send-email-tytso@mit.edu>
     [not found]                                       ` <1200970948-17903-21-git-send-email-tytso@mit.edu>
     [not found]                                         ` <1200970948-17903-22-git-send-email-tytso@mit.edu>
     [not found]                                           ` <1200970948-17903-23-git-send-email-tytso@mit.edu>
     [not found]                                             ` <1200970948-17903-24-git-send-email-tytso@mit.edu>
2008-01-23 22:06                                               ` [PATCH 23/49] Add buffer head related helper functions Andrew Morton
2008-01-24  5:22                                                 ` Aneesh Kumar K.V
2008-01-24  8:53                                                   ` Andrew Morton
     [not found]                                               ` <1200970948-17903-25-git-send-email-tytso@mit.edu>
     [not found]                                                 ` <1200970948-17903-26-git-send-email-tytso@mit.edu>
2008-01-22  3:02                                                   ` [PATCH 26/49] jbd2: Fix assertion failure in fs/jbd2/checkpoint.c Theodore Ts'o
     [not found]                                                     ` <1200970948-17903-28-git-send-email-tytso@mit.edu>
     [not found]                                                       ` <1200970948-17903-29-git-send-email-tytso@mit.edu>
     [not found]                                                         ` <1200970948-17903-30-git-send-email-tytso@mit.edu>
     [not found]                                                           ` <1200970948-17903-31-git-send-email-tytso@mit.edu>
2008-01-23 22:06                                                             ` [PATCH 30/49] ext4: Convert truncate_mutex to read write semaphore Andrew Morton
2008-01-24  5:29                                                               ` Aneesh Kumar K.V [this message]
2008-01-24 13:00                                                               ` Andy Whitcroft
     [not found]                                                             ` <1200970948-17903-32-git-send-email-tytso@mit.edu>
     [not found]                                                               ` <1200970948-17903-33-git-send-email-tytso@mit.edu>
     [not found]                                                                 ` <1200970948-17903-34-git-send-email-tytso@mit.edu>
2008-01-23 22:07                                                                   ` [PATCH 33/49] ext4: Add the journal checksum feature Andrew Morton
2008-01-23 22:40                                                                     ` Andreas Dilger
2008-01-24 21:24                                                                     ` Mingming Cao
2008-02-01 20:50                                                                       ` Girish Shilamkar
     [not found]                                                                   ` <1200970948-17903-35-git-send-email-tytso@mit.edu>
     [not found]                                                                     ` <1200970948-17903-36-git-send-email-tytso@mit.edu>
     [not found]                                                                       ` <1200970948-17903-37-git-send-email-tytso@mit.edu>
     [not found]                                                                         ` <1200970948-17903-38-git-send-email-tytso@mit.edu>
     [not found]                                                                           ` <1200970948-17903-39-git-send-email-tytso@mit.edu>
2008-01-22  3:02                                                                             ` [PATCH 39/49] ext4: Add ext4_find_next_bit() Theodore Ts'o
     [not found]                                                                               ` <1200970948-17903-41-git-send-email-tytso@mit.edu>
     [not found]                                                                                 ` <1200970948-17903-42-git-send-email-tytso@mit.edu>
2008-01-23 22:07                                                                                   ` [PATCH 41/49] ext4: Add multi block allocator for ext4 Andrew Morton
2008-01-23 23:20                                                                                     ` Andreas Dilger
2008-01-24  7:56                                                                                     ` Aneesh Kumar K.V
2008-01-24  9:04                                                                                       ` Aneesh Kumar K.V
2008-01-24 14:53                                                                                       ` Aneesh Kumar K.V
2008-01-23 22:07                                                                         ` [PATCH 36/49] ext4: Add EXT4_IOC_MIGRATE ioctl Andrew Morton
2008-01-24  5:55                                                                           ` Aneesh Kumar K.V
2008-01-26  4:15                                                                             ` Theodore Tso
2008-01-26  8:42                                                                               ` Aneesh Kumar K.V
2008-01-23 22:06                                                 ` [PATCH 24/49] ext4: add block bitmap validation Andrew Morton
2008-01-26 13:26                                                   ` Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080124052907.GB7902@skywalker \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@MIT.EDU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox