summaryrefslogtreecommitdiff
tag namereturn-sync-fs-errors-5.17_2022-01-29 (21eef15595b64a28f57e1be318e525d77e4f7546)
tag date2022-01-29 20:57:35 -0800
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 786918a584...
vfs: actually return fs errors from ->sync_fs
While auditing the VFS code, I noticed that while ->sync_fs is allowed to return error codes to reflect some sort of internal filesystem error, none of the callers actually check the return value. Back when this callout was introduced for sync_filesystem in 2.5 this didn't matter because we only did it prior to rebooting, and best-effort was enough. Nowadays, we've grown other callers that mandate persistence of fs metadata, like syncfs(2) and quota sync. Reporting internal fs errors is critical for these functions, and we drop the errors. Fix them, and also fix FIFREEZE, so that userspace can't freeze broken filesystems. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmH2Gr8ACgkQ+H93GTRK tOsOCw//V7/4868qTCqXaW6SrWRQjyvGKLtjEdYsYxAs21/1qxyq1ifg3yN+k4KA Y4XTgrOcwO2EqoAgpYH/7+I216amcwh/4akeswtBhI1ngILxvHL0fE+WPci4Eevb btjcMjjKorqW4GJVoRFBnzQ3ml1A95n9jjEdijgyB0WKRPJMXZoJ7euGJD8Li1sl Yc734HJVRVEaES7TnfNEEGkTbLn+d7jMm42G6Ebxi3oQZeCJYBxTg9nZFDBFv+Q6 inLmdFDZ7rgZ8wMFUe5ipdXr5H2HitLsatHjgl6PQwBHpPaLa7VCwXwx5XGDAPF8 qrbfVWbTmI8AnUU47zUDnMhkMHJnqEBnf41fntxheS2853IxYLhk7d0hQtY7z2/l AfWWNNLhRNCZsDhGF1Xv+w94ftWkVjoMcsBYLtQD3E+FhRamNRvrP2aOusuwT2i6 Sff5AedEXQ7NUlWmXLuAu9h7L3CBjGE7kuUi3tsL6/XWC6BIp55GLLCJELmNXoMx FyMfMG6i+WYBtft+bcOl/rTgYZZDiCtECd1gEr51rOVoNxMw2DcBGn4rPECQeTyB VWOKgrc8aSVS2JP5quwCMNtgQcqb3Wsew2MlLvRsxMLyJIMN5+Qybtfs1TyDxgUk p7WcWQ3bN/Io60RePltE6Em2x4dOUS2BgqeYAJbR8uzH4IVhsPM= =ZE3X -----END PGP SIGNATURE-----