Re: Todays kernel 2.1.131ac12

Trond Myklebust (trond.myklebust@fys.uio.no)
17 Dec 1998 15:53:11 +0100


--Multipart_Thu_Dec_17_15:53:11_1998-1
Content-Type: text/plain; charset=US-ASCII

Hi,
I have to confess to a screwup in the patch that was included in
2.1.131ac12: it introduces a major memory leak since I forgot to free
the page in the case of synchronous reads.

Please apply the following patch on top of 2.1.131ac12

Cheers,
Trond

--Multipart_Thu_Dec_17_15:53:11_1998-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="nfs-pagelocking.dif"
Content-Transfer-Encoding: 7bit

--- linux/fs/nfs/read.c-2.1.131-ac12 Thu Dec 17 15:37:46 1998
+++ linux/fs/nfs/read.c Thu Dec 17 15:48:06 1998
@@ -247,21 +247,24 @@
*/
error = nfs_wb_page(inode, page);
if (error)
- goto error;
+ goto out_error;

error = -1;
if (!IS_SWAPFILE(inode) && !PageError(page) &&
NFS_SERVER(inode)->rsize >= PAGE_SIZE)
error = nfs_readpage_async(dentry, inode, page);
- if (error < 0) /* couldn't enqueue */
- error = nfs_readpage_sync(dentry, inode, page);
- if (error < 0)
- goto error;
- return error;
-error:
+ if (error >= 0)
+ goto out;
+
+ error = nfs_readpage_sync(dentry, inode, page);
+ if (error >= 0)
+ goto out_free;
+out_error:
if (IS_SWAPFILE(inode))
printk("Aiee.. nfs swap-in of page failed!\n");
clear_bit(PG_locked, &page->flags);
+out_free:
free_page(page_address(page));
+out:
return error;
}

--Multipart_Thu_Dec_17_15:53:11_1998-1--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/