Skip to content

Commit 144fa8a

Browse files
Matthew Wilcox (Oracle)brauner
authored andcommitted
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)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Mike Marshall <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 50fb0a7 commit 144fa8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/orangefs/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inode,
5757
int buffer_index;
5858
ssize_t ret;
5959
size_t copy_amount;
60-
int open_for_read;
61-
int open_for_write;
60+
bool open_for_read;
61+
bool open_for_write;
6262

6363
new_op = op_alloc(ORANGEFS_VFS_OP_FILE_IO);
6464
if (!new_op)

0 commit comments

Comments
 (0)