projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'powerpc-5.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[platform/kernel/linux-starfive.git]
/
fs
/
kernel_read_file.c
diff --git
a/fs/kernel_read_file.c
b/fs/kernel_read_file.c
index
87aac4c
..
1b07550
100644
(file)
--- a/
fs/kernel_read_file.c
+++ b/
fs/kernel_read_file.c
@@
-178,7
+178,7
@@
int kernel_read_file_from_fd(int fd, loff_t offset, void **buf,
struct fd f = fdget(fd);
int ret = -EBADF;
- if (!f.file)
+ if (!f.file
|| !(f.file->f_mode & FMODE_READ)
)
goto out;
ret = kernel_read_file(f.file, offset, buf, buf_size, file_size, id);