lkml.org 
[lkml]   [2005]   [Nov]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 21 Nov 2005 23:31:31 -0800
FromAndrew Morton <>
SubjectRe: floppy regression from "[PATCH] fix floppy.c to store correct ..."
Jon Masters <jonathan@jonmasters.org> wrote:
>
>  -	if (!UDRS->fd_ref)
>  +	if (!UDRS->fd_ref) {
>  +		opened_bdev[drive]->bd_disk->policy = 0;
>   		opened_bdev[drive] = NULL;
>  +	}
>   	floppy_release_irq_and_dma();
>  +
>   	up(&open_lock);
>   	return 0;
>   }
>  @@ -3714,6 +3719,13 @@
>   		USETF(FD_VERIFY);
>   	}
> 
>  +	/* set underlying gendisk policy to reflect device ro/rw status */
>  +	if (UDRS->first_read_date && !(UTESTF(FD_DISK_WRITABLE))) {
>  +		inode->i_bdev->bd_disk->policy = 1;
>  +	} else {
>  +		inode->i_bdev->bd_disk->policy = 0;
>  +	}
>  +	

That still does the wrong thing.  Put in a write-protected floppy, try to
write to it and it says -EROFS.  Then pop the WP switch and try to write to
it again and it wrongly claims EPERM.  A second attempt to write will
succeed.

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

\
 
 \ /
  Last update: 2005-11-22 08:34    [from the cache]
©2003-2008