From: IWAMOTO Toshihiro It seems that O_DIRECT write sometimes leaks memory. Signed-off-by: Andrew Morton --- 25-akpm/fs/direct-io.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -puN fs/direct-io.c~direct-io-write-memory-leak-fix fs/direct-io.c --- 25/fs/direct-io.c~direct-io-write-memory-leak-fix Thu Oct 28 15:24:37 2004 +++ 25-akpm/fs/direct-io.c Thu Oct 28 15:24:37 2004 @@ -844,8 +844,10 @@ do_holes: char *kaddr; /* AKPM: eargh, -ENOTBLK is a hack */ - if (dio->rw == WRITE) + if (dio->rw == WRITE) { + page_cache_release(page); return -ENOTBLK; + } if (dio->block_in_file >= i_size_read(dio->inode)>>blkbits) { _