Lines Matching +full:1 +full:ac
20 * Plugged two leaks. 1) It didn't return acct_file into the free_filps if
75 #define SUSPEND (acct_parm[1]) /* <foo% free space - suspend */
142 acct->active = 1; in check_free_space()
259 atomic_long_set(&acct->count, 1); in acct_on()
267 mutex_lock_nested(&acct->lock, 1); /* nobody has seen it yet */ in acct_on()
332 #define MAXFRACT ((1 << MANTSIZE) - 1) /* Maximum fractional value. */
340 rnd = value & (1 << (EXPSIZE - 1)); /* Round up? */ in encode_comp_t()
361 #if ACCT_VERSION == 1 || ACCT_VERSION == 2
373 #define MAXFRACT2 ((1ul << MANTSIZE2) - 1) /* Maximum fractional value. */
374 #define MAXEXP2 ((1 << EXPSIZE2) - 1) /* Maximum exponent. */
380 exp = (value > (MAXFRACT2>>1)); in encode_comp2_t()
383 rnd = value & 1; in encode_comp2_t()
384 value >>= 1; in encode_comp2_t()
392 value >>= 1; in encode_comp2_t()
398 return (1ul << (MANTSIZE2+EXPSIZE2-1)) - 1; in encode_comp2_t()
400 return (value & (MAXFRACT2>>1)) | (exp << (MANTSIZE2-1)); in encode_comp2_t()
415 value <<= 1; in encode_float()
432 static void fill_ac(acct_t *ac) in fill_ac() argument
443 memset(ac, 0, sizeof(acct_t)); in fill_ac()
445 ac->ac_version = ACCT_VERSION | ACCT_BYTEORDER; in fill_ac()
446 strlcpy(ac->ac_comm, current->comm, sizeof(ac->ac_comm)); in fill_ac()
454 ac->ac_etime = encode_float(elapsed); in fill_ac()
456 ac->ac_etime = encode_comp_t(elapsed < (unsigned long) -1l ? in fill_ac()
457 (unsigned long) elapsed : (unsigned long) -1l); in fill_ac()
459 #if ACCT_VERSION == 1 || ACCT_VERSION == 2 in fill_ac()
464 ac->ac_etime_hi = etime >> 16; in fill_ac()
465 ac->ac_etime_lo = (u16) etime; in fill_ac()
470 ac->ac_btime = clamp_t(time64_t, btime, 0, U32_MAX); in fill_ac()
472 ac->ac_ahz = AHZ; in fill_ac()
477 ac->ac_tty = tty ? old_encode_dev(tty_devnum(tty)) : 0; in fill_ac()
478 ac->ac_utime = encode_comp_t(nsec_to_AHZ(pacct->ac_utime)); in fill_ac()
479 ac->ac_stime = encode_comp_t(nsec_to_AHZ(pacct->ac_stime)); in fill_ac()
480 ac->ac_flag = pacct->ac_flag; in fill_ac()
481 ac->ac_mem = encode_comp_t(pacct->ac_mem); in fill_ac()
482 ac->ac_minflt = encode_comp_t(pacct->ac_minflt); in fill_ac()
483 ac->ac_majflt = encode_comp_t(pacct->ac_majflt); in fill_ac()
484 ac->ac_exitcode = pacct->ac_exitcode; in fill_ac()
492 acct_t ac; in do_acct_process() local
512 fill_ac(&ac); in do_acct_process()
514 ac.ac_uid = from_kuid_munged(file->f_cred->user_ns, orig_cred->uid); in do_acct_process()
515 ac.ac_gid = from_kgid_munged(file->f_cred->user_ns, orig_cred->gid); in do_acct_process()
516 #if ACCT_VERSION == 1 || ACCT_VERSION == 2 in do_acct_process()
518 ac.ac_uid16 = ac.ac_uid; in do_acct_process()
519 ac.ac_gid16 = ac.ac_gid; in do_acct_process()
524 ac.ac_pid = task_tgid_nr_ns(current, ns); in do_acct_process()
526 ac.ac_ppid = task_tgid_nr_ns(rcu_dereference(current->real_parent), in do_acct_process()
538 __kernel_write(file, &ac, sizeof(acct_t), &pos); in do_acct_process()