]> git.hungrycats.org Git - linux/commitdiff
[PATCH] minor cleanup in ext3 code
authorAndreas Dilger <adilger@clusterfs.com>
Sun, 28 Apr 2002 12:28:40 +0000 (05:28 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 28 Apr 2002 12:28:40 +0000 (05:28 -0700)
The following patch is a _very minor_ cleanup in the ext3 code for
ext3_prepare_write().  It simply removes the setting of "handle" from
the current transaction handle, because "handle" is actually set again
a couple of lines later, where it properly allocates a new transaction
handle for this write.  The code removed in this patch is probably left
over from some development version of ext3 where the transaction handle
was started before ext3_prepare_write was called.

The only reason I saw this was because I was trying to find where the
handle was allocated for an ext3 file write, and at first glance it
didn't appear to be allocated anywhere...

fs/ext3/inode.c

index 6218acef217207695941cb1161d9dd560a25d20f..87220470cc5746fb3ae2b782098788920518b34d 100644 (file)
@@ -1014,8 +1014,8 @@ static int ext3_prepare_write(struct file *file, struct page *page,
                              unsigned from, unsigned to)
 {
        struct inode *inode = page->mapping->host;
-       handle_t *handle = ext3_journal_current_handle();
        int ret, needed_blocks = ext3_writepage_trans_blocks(inode);
+       handle_t *handle;
 
        lock_kernel();
        handle = ext3_journal_start(inode, needed_blocks);