public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Greg KH <gregkh@suse.de>
Cc: Dmitry Monakhov <dmonakhov@openvz.org>,
	Dmitry Monakhov <rjevskiy@gmail.com>, Greg KH <gregkh@suse.de>,
	Thomas Voegtle <tv@lio96.de>, Jan Kara <jack@suse.cz>,
	"Theodore Ts'o" <tytso@mit.edu>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	torvalds@linux-foundation.org, stable@kernel.org
Subject: Re: [PATCH] quota: fix reserved space management for ordinary fs
Date: Fri, 8 Jan 2010 13:41:39 +0100	[thread overview]
Message-ID: <20100108124139.GC3354@quack.suse.cz> (raw)
In-Reply-To: <87wrztpgbh.fsf_-_@openvz.org>

On Fri 08-01-10 03:53:54, Dmitry Monakhov wrote:
> 
> In fact inode_get_rsv_space() function is special in comparison
> with inode_{add,sub,claim}_rsv_space() functions, because
> it may return correct result even for fs without reserved space
> support(correct val == 0). Add trivial check for that case.
> The patch fix regression(BUG at fs/quota/dquot.c:1350) introduced
> in following commit: fd8fbfc1709822bd94247c5b2ab15a5f5041e103
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
  Acked-by: Jan Kara <jack@suse.cz>

Greg, please merge this patch to stable series. I'll push the same
patch I have in my tree to Linus on Monday.

								Honza
> ---
>  fs/quota/dquot.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
> index dea86ab..d9f06cf 100644
> --- a/fs/quota/dquot.c
> +++ b/fs/quota/dquot.c
> @@ -1377,6 +1377,8 @@ static void inode_sub_rsv_space(struct inode *inode, qsize_t number)
>  static qsize_t inode_get_rsv_space(struct inode *inode)
>  {
>  	qsize_t ret;
> +	if (!inode->i_sb->dq_op->get_reserved_space)
> +		return 0;
>  	spin_lock(&inode->i_lock);
>  	ret = *inode_reserved_space(inode);
>  	spin_unlock(&inode->i_lock);
> -- 
> 1.6.3.3
> 
> 
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  parent reply	other threads:[~2010-01-08 12:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06 23:45 Linux 2.6.31.10 Greg KH
2010-01-06 23:45 ` Greg KH
2010-01-07 14:27 ` Thomas Voegtle
2010-01-07 18:04   ` Greg KH
2010-01-07 19:36     ` Thomas Voegtle
2010-01-07 19:41       ` Greg KH
2010-01-07 20:33         ` Thomas Voegtle
2010-01-07 20:42           ` Thomas Voegtle
2010-01-07 22:02             ` Greg KH
2010-01-08  0:03               ` Dmitry Monakhov
2010-01-08  0:53                 ` [PATCH] quota: fix reserved space management for ordinary fs Dmitry Monakhov
2010-01-08 11:03                   ` Thomas Voegtle
2010-01-08 12:24                     ` Teck Choon Giam
2010-01-08 12:41                   ` Jan Kara [this message]
2010-01-08 15:52                     ` Greg KH
2010-01-12 12:23                       ` Jan Kara
2010-01-12 14:24                         ` Greg KH
2010-01-08 12:39                 ` Linux 2.6.31.10 Jan Kara
2010-01-13 21:15               ` Ozan Çağlayan
2010-01-13 21:17                 ` Ozan Çağlayan
2010-01-13 21:45                   ` Greg KH
2010-01-07 18:12   ` Teck Choon Giam

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=20100108124139.GC3354@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=dmonakhov@openvz.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjevskiy@gmail.com \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tv@lio96.de \
    --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