From: Dan Carpenter <error27@gmail.com>
To: Joern Engel <joern@logfs.org>
Cc: linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/17] [LogFS] dir.c
Date: Mon, 23 Nov 2009 13:17:44 +0200 [thread overview]
Message-ID: <20091123111744.GA17527@bicker> (raw)
In-Reply-To: <E1NBZIP-0003g2-0r@longford.logfs.org>
On Fri, Nov 20, 2009 at 08:37:29PM +0100, Joern Engel wrote:
> +static int logfs_unlink(struct inode *dir, struct dentry *dentry)
> +{
> + struct logfs_super *super = logfs_super(dir->i_sb);
> + struct inode *inode = dentry->d_inode;
> + struct logfs_transaction *ta;
> + struct page *page;
> + pgoff_t index;
> + int ret;
> +
> + ta = kzalloc(sizeof(*ta), GFP_KERNEL);
> + if (!ta)
> + return -ENOMEM;
> +
> + ta->state = UNLINK_1;
> + ta->ino = inode->i_ino;
> +
> + inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
> +
> + page = logfs_get_dd_page(dir, dentry);
> + if (!page)
kfree(ta);
> + return -ENOENT;
> + if (IS_ERR(page))
kfree(ta);
> + return PTR_ERR(page);
regards,
dan carpenter
next parent reply other threads:[~2009-11-23 11:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091120181113.GA2159@logfs.org>
[not found] ` <E1NBZIP-0003g2-0r@longford.logfs.org>
2009-11-23 11:17 ` Dan Carpenter [this message]
2009-11-23 13:32 ` [PATCH 5/17] [LogFS] dir.c Jörn Engel
2009-11-23 12:18 ` [PATCH 0/17] [LogFS] New flash filesystem Arnd Bergmann
2009-11-25 15:55 ` Jörn Engel
2009-11-25 23:51 ` Stephen Rothwell
2009-11-26 8:36 ` Jörn Engel
2009-11-27 4:24 ` Stephen Rothwell
[not found] ` <E1NBZJ5-0003hL-Qc@longford.logfs.org>
2009-11-23 12:33 ` [PATCH 12/17] [LogFS] readwrite.c Pekka Enberg
2009-11-23 13:15 ` Jörn Engel
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=20091123111744.GA17527@bicker \
--to=error27@gmail.com \
--cc=joern@logfs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox