Re: floppy regression from "[PATCH] fix floppy.c to store correct ..."

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jon Masters <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux