lkml.org 
[lkml]   [2008]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: isofs - Re: 2.6.24-mm1 bugs
On Fri, 15 Feb 2008 11:46:55 -0500
Valdis.Kletnieks@vt.edu wrote:

> On Fri, 15 Feb 2008 12:43:45 +0100, Miklos Szeredi said:
> > I'm trying out 2.6.24-mm1 on my work laptop (T60), and generally it
>
> > - mounting isofs always results in an empty directory
>
> I hit this in 24-rc8-mm1, and bisected it down to
> iget-stop-isofs-from-using-read_inode-fix-2.patch
>
> Apparently it got broken way back in 24-rc6-mm1.
>
> And that directory is *really* empty - even . and .. are missing. :)
>

Seems that 2.6.24-mm1+hot-fixes still didn't have
iget-stop-isofs-from-using-read_inode-fix-3.patch:



From: David Howells <dhowells@redhat.com>

Fix isofs_get_block() to return only 0 on success. It shouldn't return a
+ve block count for example.

Also make sure that isofs_get_blocks() doesn't accidentally return an error
if rv is 0 come the return statement.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

fs/isofs/inode.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff -puN fs/isofs/inode.c~iget-stop-isofs-from-using-read_inode-fix-3 fs/isofs/inode.c
--- a/fs/isofs/inode.c~iget-stop-isofs-from-using-read_inode-fix-3
+++ a/fs/isofs/inode.c
@@ -1022,6 +1022,7 @@ int isofs_get_blocks(struct inode *inode
rv++;
}

+ error = 0;
abort:
unlock_kernel();
return rv != 0 ? rv : error;
@@ -1033,12 +1034,15 @@ abort:
static int isofs_get_block(struct inode *inode, sector_t iblock,
struct buffer_head *bh_result, int create)
{
+ int ret;
+
if (create) {
printk(KERN_DEBUG "%s: Kernel tries to allocate a block\n", __func__);
return -EROFS;
}

- return isofs_get_blocks(inode, iblock, &bh_result, 1);
+ ret = isofs_get_blocks(inode, iblock, &bh_result, 1);
+ return ret < 0 ? ret : 0;
}

static int isofs_bmap(struct inode *inode, sector_t block)
_


\
 
 \ /
  Last update: 2008-02-15 21:19    [W:0.138 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site