All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel <daniel@makrotopia.org>
To: hujianyang <hujianyang@huawei.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH] ubifs: add missing ui pointer in debugging code
Date: Thu, 15 May 2014 17:54:50 +0200	[thread overview]
Message-ID: <5374E34A.1000003@makrotopia.org> (raw)
In-Reply-To: <53731C00.1020203@huawei.com>

On 05/14/2014 09:32 AM, hujianyang wrote:
>> diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
>> index 4f34dba..e13ec5e 100644
>> --- a/fs/ubifs/file.c
>> +++ b/fs/ubifs/file.c
>> @@ -903,6 +903,7 @@ static int do_writepage(struct page *page, int len)
>>  	struct ubifs_info *c = inode->i_sb->s_fs_info;
>>  
>>  #ifdef UBIFS_DEBUG
>> +	struct ubifs_inode *ui = ubifs_inode(inode);
>>  	spin_lock(&ui->ui_lock);
>>  	ubifs_assert(page->index <= ui->synced_i_size << PAGE_CACHE_SIZE);
> 
> I think here should be:
>   	ubifs_assert(page->index <= ui->synced_i_size >> PAGE_CACHE_SHIFT);
> 
> as line 1023 in ubifs_writepage:
> 
>         /* Is the page fully inside @i_size? */
>         if (page->index < end_index) {
>                 if (page->index >= synced_i_size >> PAGE_CACHE_SHIFT) {
>                         err = inode->i_sb->s_op->write_inode(inode, NULL);
> 

My intention was merely to get the code compiled with UBIFS_DEBUG enabled. If
things further than that need to be sorted out in that place as well, I suggest
that should go in a separate discussion.


Cheers

Daniel

  reply	other threads:[~2014-05-15 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13 20:27 [PATCH] ubifs: add missing ui pointer in debugging code Daniel Golle
2014-05-14  7:32 ` hujianyang
2014-05-15 15:54   ` Daniel [this message]
2014-05-27 12:28   ` Artem Bityutskiy
2014-05-28  2:27     ` hujianyang
2014-05-28  8:04       ` Artem Bityutskiy
2014-05-27 12:27 ` Artem Bityutskiy

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=5374E34A.1000003@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=dedekind1@gmail.com \
    --cc=hujianyang@huawei.com \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.