LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* 2.6.24-rc6-mm1 - iget-stop-isofs-from-using-read_inode-fix-2.patch
@ 2008-01-29 16:53 Valdis.Kletnieks
2008-02-05 10:09 ` David Howells
0 siblings, 1 reply; 2+ messages in thread
From: Valdis.Kletnieks @ 2008-01-29 16:53 UTC (permalink / raw)
To: Andrew Morton, David Howells; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]
Sorry for the late notice - I hit the original issue with this code,
and I tested the *first* patch, which addressed my immediate problem, but
didn't test the subsequent flurry of "better" patches due to time issues
here.
I back up my laptop by doing one or more 'dump' commands into a $STAGE directory,
and then doing a 'growisofs' onto a DVD. And of course, I eventually needed
to restore something that got damaged by some misbehaving userspace, so I break
out the disk, which had 8 dump images for smaller filesystems on it. Imagine
my surprise when the disk was unreadable - so I went bisecting and eventually
found it first in the -rc6-mm1 tree.
Under 2.6.4-rc6-mm1 quilted up to iget-stop-isofs-from-using-read_inode.patch,
it's able to see all 8 dump images. When I quilt push the very next one
(iget-stop-isofs-from-using-read_inode-fix-2.patch), all hell breaks loose:
[root@turing-police ~]# mount -t iso9660 /dev/cdrom /mnt/cdrom
[root@turing-police ~]# ls -la /mnt/cdrom
total 0
[root@turing-police ~]# umount /mnt/cdrom
It claims to mount correctly - but ls can't find anything.
*not even . and .. - how weird is that?*
Looking at the code, I don't see why inode-fix-2 breaks it, nor do I see
why inode-fix-2-update or inode-fix-2-update-fix don't re-fix it...
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 2.6.24-rc6-mm1 - iget-stop-isofs-from-using-read_inode-fix-2.patch
2008-01-29 16:53 2.6.24-rc6-mm1 - iget-stop-isofs-from-using-read_inode-fix-2.patch Valdis.Kletnieks
@ 2008-02-05 10:09 ` David Howells
0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2008-02-05 10:09 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: dhowells, Andrew Morton, linux-kernel
How about this patch?
David
---
IGET: Fix isofs_get_block() to only return 0 on success.
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>
---
fs/isofs/inode.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 0f5ed8c..875d37f 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -1022,6 +1022,7 @@ int isofs_get_blocks(struct inode *inode, sector_t iblock_s,
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-05 10:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-29 16:53 2.6.24-rc6-mm1 - iget-stop-isofs-from-using-read_inode-fix-2.patch Valdis.Kletnieks
2008-02-05 10:09 ` David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).