struct page *page;
 
        if (!ext3_can_truncate(inode))
-               return;
+               goto out_notrans;
 
        if (inode->i_size == 0 && ext3_should_writeback_data(inode))
                ei->i_state |= EXT3_STATE_FLUSH_ON_CLOSE;
                page = grab_cache_page(mapping,
                                inode->i_size >> PAGE_CACHE_SHIFT);
                if (!page)
-                       return;
+                       goto out_notrans;
        }
 
        handle = start_transaction(inode);
                        unlock_page(page);
                        page_cache_release(page);
                }
-               return;         /* AKPM: return what? */
+               goto out_notrans;
        }
 
        last_block = (inode->i_size + blocksize-1)
                ext3_orphan_del(handle, inode);
 
        ext3_journal_stop(handle);
+       return;
+out_notrans:
+       /*
+        * Delete the inode from orphan list so that it doesn't stay there
+        * forever and trigger assertion on umount.
+        */
+       if (inode->i_nlink)
+               ext3_orphan_del(NULL, inode);
 }
 
 static ext3_fsblk_t ext3_get_inode_block(struct super_block *sb,
 
        rc = inode_setattr(inode, attr);
 
-       /* If inode_setattr's call to ext3_truncate failed to get a
-        * transaction handle at all, we need to clean up the in-core
-        * orphan list manually. */
-       if (inode->i_nlink)
-               ext3_orphan_del(NULL, inode);
-
        if (!rc && (ia_valid & ATTR_MODE))
                rc = ext3_acl_chmod(inode);