From: Curt Wohlgemuth <curtw@google.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH] ext4: use __ext4_get_inode_loc() from ext4_write_inode()
Date: Fri, 26 Mar 2010 15:01:26 -0700 [thread overview]
Message-ID: <6601abe91003261501i1a12a953n9c2367ed4b0dd3b2@mail.gmail.com> (raw)
Fix for no-journal ext4_write_inode() code path: ensure in_mem is 0 on call
to __ext4_get_inode_loc()
Signed-off-by: Curt Wohlgemuth <curtw@google.com>
---
In the no-journal case, ext4_write_inode() simply gets the BH for the inode
table block and calls sync_dirty_buffer() on it. But it doesn't copy the
in-memory inode contents to the on-disk format on the BH. So it *must* not
cause the in_mem parameter to __ext4_get_inode_loc() to be 1, which it will
be if it uses ext4_get_inode_loc().
diff -uprN orig/fs/ext4/inode.c new/fs/ext4/inode.c
--- orig/fs/ext4/inode.c 2010-03-22 08:16:57.000000000 -0700
+++ new/fs/ext4/inode.c 2010-03-26 14:50:38.000000000 -0700
@@ -5374,7 +5374,7 @@ int ext4_write_inode(struct inode *inode
} else {
struct ext4_iloc iloc;
- err = ext4_get_inode_loc(inode, &iloc);
+ err = __ext4_get_inode_loc(inode, &iloc, 0);
if (err)
return err;
if (wbc->sync_mode == WB_SYNC_ALL)
next reply other threads:[~2010-03-26 22:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 22:01 Curt Wohlgemuth [this message]
2010-04-03 21:28 ` [PATCH] ext4: use __ext4_get_inode_loc() from ext4_write_inode() tytso
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=6601abe91003261501i1a12a953n9c2367ed4b0dd3b2@mail.gmail.com \
--to=curtw@google.com \
--cc=linux-ext4@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).