1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

- Assert that the filedesc lock is being held when fdisused() is called.

- Fix white spaces.

MFC after:	1 month
This commit is contained in:
Pawel Jakub Dawidek 2012-06-14 15:35:14 +00:00
parent 7aef754274
commit 215aeba939
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237076

View File

@ -243,8 +243,10 @@ static int
fdisused(struct filedesc *fdp, int fd)
{
KASSERT(fd >= 0 && fd < fdp->fd_nfiles,
("file descriptor %d out of range (0, %d)", fd, fdp->fd_nfiles));
FILEDESC_LOCK_ASSERT(fdp);
KASSERT(fd >= 0 && fd < fdp->fd_nfiles,
("file descriptor %d out of range (0, %d)", fd, fdp->fd_nfiles));
return ((fdp->fd_map[NDSLOT(fd)] & NDBIT(fd)) != 0);
}