lkml.org 
[lkml]   [2020]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/7] hfsplus: stop using ioctl_by_bdev
From
Date
On 4/25/20 1:57 AM, Christoph Hellwig wrote:
> if (HFSPLUS_SB(sb)->session >= 0) {
> + struct cdrom_tocentry te;
> +
> + if (!cdi)
> + return -EINVAL;
> +
> te.cdte_track = HFSPLUS_SB(sb)->session;
> te.cdte_format = CDROM_LBA;
> - res = ioctl_by_bdev(sb->s_bdev,
> - CDROMREADTOCENTRY, (unsigned long)&te);
> - if (!res && (te.cdte_ctrl & CDROM_DATA_TRACK) == 4) {
> - *start = (sector_t)te.cdte_addr.lba << 2;
> - return 0;
> + if (cdrom_read_tocentry(cdi, &te) ||
> + (te.cdte_ctrl & CDROM_DATA_TRACK) != 4) {
> + pr_err("invalid session number or type of track\n");
> + return -EINVAL;
> }

I must be missing something obvious from just looking over the patches,
but how does this work if cdrom is modular and hfsplus is builtin?

--
Jens Axboe

\
 
 \ /
  Last update: 2020-05-04 18:17    [W:0.134 / U:3.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site