From: Namjae Jeon Date: Fri, 8 May 2026 05:33:35 +0000 (+0900) Subject: exfat: add exfat_file_open() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a095c12ef13156cc86de858c8d127f24895e2d6e;p=thirdparty%2Flinux.git exfat: add exfat_file_open() Add exfat_file_open() to handle file open operation for exFAT. This change is a preparation step before introducing iomap-based direct IO support. Acked-by: Christoph Hellwig Acked-by: "Darrick J. Wong" Signed-off-by: Namjae Jeon --- diff --git a/fs/exfat/file.c b/fs/exfat/file.c index 935dcc803ebb..857cd3030cae 100644 --- a/fs/exfat/file.c +++ b/fs/exfat/file.c @@ -813,7 +813,16 @@ static ssize_t exfat_splice_read(struct file *in, loff_t *ppos, return filemap_splice_read(in, ppos, pipe, len, flags); } +static int exfat_file_open(struct inode *inode, struct file *filp) +{ + if (unlikely(exfat_forced_shutdown(inode->i_sb))) + return -EIO; + + return generic_file_open(inode, filp); +} + const struct file_operations exfat_file_operations = { + .open = exfat_file_open, .llseek = generic_file_llseek, .read_iter = exfat_file_read_iter, .write_iter = exfat_file_write_iter,