mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-01 00:12:36 -05:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
commit 27ca8273fda398638ca994a207323a85b6d81190 upstream.
Per fstrim(8) we must round up the minlen argument to the fs block size.
The current calculation doesn't take into account devices that have a
discard granularity and requested minlen less than 1 fs block, so the
value can get shifted away to zero in the translation to fs blocks.
The zero minlen passed to gfs2_rgrp_send_discards() then allows
sb_issue_discard() to be called with nr_sects == 0 which returns -EINVAL
and results in gfs2_rgrp_send_discards() returning -EIO.
Make sure minlen is never < 1 fs block by taking the max of the
requested minlen and the fs block size before comparing to the device's
discard granularity and shifting to fs blocks.
Fixes:
|
||
| .. | ||
| acl.c | ||
| acl.h | ||
| aops.c | ||
| aops.h | ||
| bmap.c | ||
| bmap.h | ||
| dentry.c | ||
| dir.c | ||
| dir.h | ||
| export.c | ||
| file.c | ||
| gfs2.h | ||
| glock.c | ||
| glock.h | ||
| glops.c | ||
| glops.h | ||
| incore.h | ||
| inode.c | ||
| inode.h | ||
| Kconfig | ||
| lock_dlm.c | ||
| log.c | ||
| log.h | ||
| lops.c | ||
| lops.h | ||
| main.c | ||
| Makefile | ||
| meta_io.c | ||
| meta_io.h | ||
| ops_fstype.c | ||
| quota.c | ||
| quota.h | ||
| recovery.c | ||
| recovery.h | ||
| rgrp.c | ||
| rgrp.h | ||
| super.c | ||
| super.h | ||
| sys.c | ||
| sys.h | ||
| trace_gfs2.h | ||
| trans.c | ||
| trans.h | ||
| util.c | ||
| util.h | ||
| xattr.c | ||
| xattr.h | ||