Re: [PATCH 6/6] ext4: Dynamically allocate the jbd2_inode in ext4_inode_info as necessary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux