mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Remove the global variable 'cmask', which was used to initialize the
fd_cmask field in the file descriptor structure for the first process indirectly from CMASK, and when an fd structure is initialized before being filled in, and instead just use CMASK. This appears to be an artifact left over from the initial integration of quotas into BSD. Suggested by: peter
This commit is contained in:
parent
28e2ce478d
commit
c142b0fcfe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120659
@ -97,8 +97,6 @@ static struct plimit limit0;
|
||||
struct vmspace vmspace0;
|
||||
struct proc *initproc;
|
||||
|
||||
int cmask = CMASK;
|
||||
|
||||
struct vnode *rootvp;
|
||||
int boothowto = 0; /* initialized so that it can be patched */
|
||||
SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, "");
|
||||
@ -413,7 +411,7 @@ proc0_init(void *dummy __unused)
|
||||
p->p_fdtol = NULL;
|
||||
mtx_init(&fdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, NULL, MTX_DEF);
|
||||
fdp->fd_fd.fd_refcnt = 1;
|
||||
fdp->fd_fd.fd_cmask = cmask;
|
||||
fdp->fd_fd.fd_cmask = CMASK;
|
||||
fdp->fd_fd.fd_ofiles = fdp->fd_dfiles;
|
||||
fdp->fd_fd.fd_ofileflags = fdp->fd_dfileflags;
|
||||
fdp->fd_fd.fd_nfiles = NDFILE;
|
||||
|
@ -102,7 +102,6 @@ static int do_dup(struct thread *td, enum dup_type type, int old, int new,
|
||||
*/
|
||||
struct filelist filehead; /* head of list of open files */
|
||||
int nfiles; /* actual number of open files */
|
||||
extern int cmask;
|
||||
struct sx filelist_lock; /* sx to protect filelist */
|
||||
struct mtx sigio_lock; /* mtx to protect pointers to sigio */
|
||||
|
||||
@ -1264,7 +1263,7 @@ fdinit(fdp)
|
||||
|
||||
/* Create the file descriptor table. */
|
||||
newfdp->fd_fd.fd_refcnt = 1;
|
||||
newfdp->fd_fd.fd_cmask = cmask;
|
||||
newfdp->fd_fd.fd_cmask = CMASK;
|
||||
newfdp->fd_fd.fd_ofiles = newfdp->fd_dfiles;
|
||||
newfdp->fd_fd.fd_ofileflags = newfdp->fd_dfileflags;
|
||||
newfdp->fd_fd.fd_nfiles = NDFILE;
|
||||
|
Loading…
Reference in New Issue
Block a user