linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Hogan <james@albanarts.com>
To: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Embedded <linux-embedded@vger.kernel.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	Tim Bird <tim.bird@am.sony.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 10/16 v2] pramfs: XIP operations
Date: Sat, 6 Nov 2010 13:33:30 +0000	[thread overview]
Message-ID: <20101106133330.GC13522@gandalf.local> (raw)
In-Reply-To: <4CD518EF.3030306@gmail.com>

Hi,

On Sat, Nov 06, 2010 at 09:59:27AM +0100, Marco Stornelli wrote:
> diff -Nurp linux-2.6.36-orig/fs/pramfs/xip.c linux-2.6.36/fs/pramfs/xip.c
> --- linux-2.6.36-orig/fs/pramfs/xip.c	1970-01-01 01:00:00.000000000 +0100
> +++ linux-2.6.36/fs/pramfs/xip.c	2010-09-14 18:49:52.000000000 +0200
<snip>
> +static int pram_find_and_alloc_blocks(struct inode *inode, sector_t iblock,
> +				     sector_t *data_block, int create)
> +{
> +	int err = -EIO;
> +	u64 block;
> +
> +	mutex_lock(&PRAM_I(inode)->truncate_lock);

fs/pramfs/xip.c: In function ‘pram_find_and_alloc_blocks’:
fs/pramfs/xip.c:27: error: ‘struct pram_inode_vfs’ has no member named
‘truncate_lock’
fs/pramfs/xip.c:52: error: ‘struct pram_inode_vfs’ has no member named
‘truncate_lock’

i guess that should be truncate_mutex.

> +
> +	block = pram_find_data_block(inode, iblock);
> +
> +	if (!block) {
> +		if (!create) {
> +			err = -ENODATA;
> +			goto err;
> +		}
> +
> +		err = pram_alloc_blocks(inode, iblock, 1);
> +		if (err)
> +			goto err;
> +
> +		block = pram_find_data_block(inode, iblock);
> +		if (!block) {
> +			err = -ENODATA;
> +			goto err;
> +		}
> +	}
> +
> +	*data_block = block;
> +	err = 0;
> +
> + err:
> +	mutex_unlock(&PRAM_I(inode)->truncate_lock);

same here

> +	return err;
> +}

Cheers
James

  reply	other threads:[~2010-11-06 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06  8:59 [PATCH 10/16 v2] pramfs: XIP operations Marco Stornelli
2010-11-06 13:33 ` James Hogan [this message]
2010-11-06 15:00   ` Marco Stornelli

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=20101106133330.GC13522@gandalf.local \
    --to=james@albanarts.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.stornelli@gmail.com \
    --cc=tim.bird@am.sony.com \
    /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;
as well as URLs for NNTP newsgroup(s).