orangefs: make open_for_read and open_for_write boolean

sparse currently warns:

fs/orangefs/file.c:119:32: warning: incorrect type in assignment (different base types)
fs/orangefs/file.c:119:32:    expected int open_for_write
fs/orangefs/file.c:119:32:    got restricted fmode_t

Turning open_for_write and open_for_read into booleans (which is how
they're used) removes this warning.

Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Link: https://lore.kernel.org/r/20250305204734.1475264-4-willy@infradead.org
Tested-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2025-03-05 20:47:27 +00:00 committed by Christian Brauner
parent 50fb0a7f43
commit 144fa8ae08
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2

View File

@ -57,8 +57,8 @@ ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inode,
int buffer_index;
ssize_t ret;
size_t copy_amount;
int open_for_read;
int open_for_write;
bool open_for_read;
bool open_for_write;
new_op = op_alloc(ORANGEFS_VFS_OP_FILE_IO);
if (!new_op)