Commit 1364a3c
block: Don't invalidate pagecache for invalid falloc modes
Only call truncate_bdev_range() if the fallocate mode is supported. This
fixes a bug where data in the pagecache could be invalidated if the
fallocate() was called on the block device with an invalid mode.
Fixes: 25f4c41 ("block: implement (some of) fallocate for block devices")
Cc: [email protected]
Reported-by: "Darrick J. Wong" <[email protected]>
Signed-off-by: Sarthak Kukreti <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: "Darrick J. Wong" <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Fixes: line? I've never seen those wrapped.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 07a1141 commit 1364a3c
1 file changed
+16
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
780 | 779 | | |
781 | 780 | | |
782 | 781 | | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
783 | 786 | | |
784 | 787 | | |
785 | 788 | | |
786 | 789 | | |
787 | 790 | | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
788 | 795 | | |
789 | 796 | | |
790 | 797 | | |
791 | 798 | | |
792 | 799 | | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
793 | 804 | | |
794 | 805 | | |
795 | 806 | | |
| |||
0 commit comments