Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-8460 osc: max_pages_per_rpc should be chunk size aligned
[fs/lustre-release.git]
/
lustre
/
ofd
/
lproc_ofd.c
diff --git
a/lustre/ofd/lproc_ofd.c
b/lustre/ofd/lproc_ofd.c
index
c130194
..
38093a5
100644
(file)
--- a/
lustre/ofd/lproc_ofd.c
+++ b/
lustre/ofd/lproc_ofd.c
@@
-533,7
+533,8
@@
ofd_brw_size_seq_write(struct file *file, const char __user *buffer,
return -EINVAL;
val = val * ONE_MB_BRW_SIZE;
return -EINVAL;
val = val * ONE_MB_BRW_SIZE;
- if (val <= 0 || val > DT_MAX_BRW_SIZE)
+ if (val <= 0 || val > DT_MAX_BRW_SIZE ||
+ val < (1 << ofd->ofd_blockbits))
return -ERANGE;
spin_lock(&ofd->ofd_flags_lock);
return -ERANGE;
spin_lock(&ofd->ofd_flags_lock);