git: e84e44215fe1 - main - Fix vop_readdir's ncookies handling in UFS and EXT2.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Jan 2023 03:30:39 UTC
The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=e84e44215fe19dad4d1779d5ee0b2f2d2739f016 commit e84e44215fe19dad4d1779d5ee0b2f2d2739f016 Author: Kirk McKusick <mckusick@FreeBSD.org> AuthorDate: 2023-01-02 03:29:43 +0000 Commit: Kirk McKusick <mckusick@FreeBSD.org> CommitDate: 2023-01-02 03:30:14 +0000 Fix vop_readdir's ncookies handling in UFS and EXT2. Submitted by: Kusumi Tomohiro PR: 267706 MFC after: 1 week --- sys/fs/ext2fs/ext2_lookup.c | 2 +- sys/ufs/ufs/ufs_vnops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/ext2fs/ext2_lookup.c b/sys/fs/ext2fs/ext2_lookup.c index 16f2aa88b28c..67409a5e2a17 100644 --- a/sys/fs/ext2fs/ext2_lookup.c +++ b/sys/fs/ext2fs/ext2_lookup.c @@ -265,7 +265,7 @@ nextentry: error = 0; if (ap->a_ncookies != NULL) { if (error == 0) { - ap->a_ncookies -= ncookies; + *ap->a_ncookies -= ncookies; } else { free(*ap->a_cookies, M_TEMP); *ap->a_ncookies = 0; diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index ecb8cb6900ca..93a5b173b785 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2511,7 +2511,7 @@ nextentry: error = 0; if (ap->a_ncookies != NULL) { if (error == 0) { - ap->a_ncookies -= ncookies; + *ap->a_ncookies -= ncookies; } else { free(*ap->a_cookies, M_TEMP); *ap->a_ncookies = 0;