summaryrefslogtreecommitdiff
path: root/fs/no-block.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-05-08 07:44:05 -0700
committerJens Axboe <axboe@kernel.dk>2023-05-19 19:48:53 -0600
commitbda2795a630b2f6c417675bfbf4d90ef7503dfc7 (patch)
tree43c2281158fd9d0a10179eeeee4fd9f33e91d415 /fs/no-block.c
parent3e49c1e4a6152b6ad758a28ecce8fb470f46f6ed (diff)
fs: remove the special !CONFIG_BLOCK def_blk_fops
def_blk_fops always returns -ENODEV, which dosn't match the return value of a non-existing block device with CONFIG_BLOCK, which is -ENXIO. Just remove the extra implementation and fall back to the default no_open_fops that always returns -ENXIO. Fixes: 9361401eb761 ("[PATCH] BLOCK: Make it possible to disable the block layer [try #6]") Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20230508144405.41792-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/no-block.c')
-rw-r--r--fs/no-block.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/fs/no-block.c b/fs/no-block.c
deleted file mode 100644
index 481c0f0ab4bd..000000000000
--- a/fs/no-block.c
+++ /dev/null
@@ -1,19 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/* no-block.c: implementation of routines required for non-BLOCK configuration
- *
- * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- */
-
-#include <linux/kernel.h>
-#include <linux/fs.h>
-
-static int no_blkdev_open(struct inode * inode, struct file * filp)
-{
- return -ENODEV;
-}
-
-const struct file_operations def_blk_fops = {
- .open = no_blkdev_open,
- .llseek = noop_llseek,
-};