[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110106221404.GB2857@thunk.org>
Date: Thu, 6 Jan 2011 17:14:04 -0500
From: Ted Ts'o <tytso@....edu>
To: Andreas Dilger <adilger.kernel@...ger.ca>
Cc: Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 6/6] ext4: Dynamically allocate the jbd2_inode in
ext4_inode_info as necessary
On Wed, Jan 05, 2011 at 12:26:33PM -0700, Andreas Dilger wrote:
> In fact, the only callsites of this function are protected with:
>
> if (ext4_should_order_data(inode))
> ext4_begin_ordered_truncate(inode, size)
>
> which will skip the call to ext4_begin_ordered_truncate() if the
> filesystem is running in no-journal mode (EXT4_JOURNAL(inode) ==
> NULL)). That means the only reason this function could be called
> with jinode == NULL is due to memory corruption, and it makes sense
> to replace this with:
While it's true all of the callers of this function are protected with
ext4_should_order_data(), this function can be called by unlink(), and
if the file hasn't been opened for write, jinode will be NULL. So
returning if jinode is NULL is in fact the right thing to do.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists