Skip to content

Commit

Permalink
Merge tag 'block-6.4-2023-05-13' of git://git.kernel.dk/linux
Browse files Browse the repository at this point in the history
Pull block fixes from Jens Axboe:
 "Just a few minor fixes for drivers, and a deletion of a file that is
  woefully out-of-date these days"

* tag 'block-6.4-2023-05-13' of git://git.kernel.dk/linux:
  Documentation/block: drop the request.rst file
  ublk: fix command op code check
  block/rnbd: replace REQ_OP_FLUSH with REQ_OP_WRITE
  nbd: Fix debugfs_create_dir error checking
  • Loading branch information
torvalds committed May 13, 2023
2 parents 9a48d60 + 56cdea9 commit d4d5894
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 104 deletions.
1 change: 0 additions & 1 deletion Documentation/block/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Block
kyber-iosched
null_blk
pr
request
stat
switching-sched
writeback_cache_control
Expand Down
99 changes: 0 additions & 99 deletions Documentation/block/request.rst

This file was deleted.

4 changes: 2 additions & 2 deletions drivers/block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ static int nbd_dev_dbg_init(struct nbd_device *nbd)
return -EIO;

dir = debugfs_create_dir(nbd_name(nbd), nbd_dbg_dir);
if (!dir) {
if (IS_ERR(dir)) {
dev_err(nbd_to_dev(nbd), "Failed to create debugfs dir for '%s'\n",
nbd_name(nbd));
return -EIO;
Expand All @@ -1692,7 +1692,7 @@ static int nbd_dbg_init(void)
struct dentry *dbg_dir;

dbg_dir = debugfs_create_dir("nbd", NULL);
if (!dbg_dir)
if (IS_ERR(dbg_dir))
return -EIO;

nbd_dbg_dir = dbg_dir;
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/rnbd/rnbd-proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static inline blk_opf_t rnbd_to_bio_flags(u32 rnbd_opf)
bio_opf = REQ_OP_WRITE;
break;
case RNBD_OP_FLUSH:
bio_opf = REQ_OP_FLUSH | REQ_PREFLUSH;
bio_opf = REQ_OP_WRITE | REQ_PREFLUSH;
break;
case RNBD_OP_DISCARD:
bio_opf = REQ_OP_DISCARD;
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/ublk_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ static inline int ublk_check_cmd_op(u32 cmd_op)
{
u32 ioc_type = _IOC_TYPE(cmd_op);

if (IS_ENABLED(CONFIG_BLKDEV_UBLK_LEGACY_OPCODES) && ioc_type != 'u')
if (!IS_ENABLED(CONFIG_BLKDEV_UBLK_LEGACY_OPCODES) && ioc_type != 'u')
return -EOPNOTSUPP;

if (ioc_type != 'u' && ioc_type != 0)
Expand Down

0 comments on commit d4d5894

Please sign in to comment.