mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-03 03:10:06 +07:00
kernel/acct.c: fix coding style warnings and errors
Signed-off-by: Ionut Alexa <ionut.m.alexa@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
3064c3563b
commit
2577d92ebd
@ -108,14 +108,14 @@ static int check_free_space(struct bsd_acct_struct *acct)
|
||||
do_div(suspend, 100);
|
||||
if (sbuf.f_bavail <= suspend) {
|
||||
acct->active = 0;
|
||||
printk(KERN_INFO "Process accounting paused\n");
|
||||
pr_info("Process accounting paused\n");
|
||||
}
|
||||
} else {
|
||||
u64 resume = sbuf.f_blocks * RESUME;
|
||||
do_div(resume, 100);
|
||||
if (sbuf.f_bavail >= resume) {
|
||||
acct->active = 1;
|
||||
printk(KERN_INFO "Process accounting resumed\n");
|
||||
pr_info("Process accounting resumed\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -280,6 +280,7 @@ SYSCALL_DEFINE1(acct, const char __user *, name)
|
||||
|
||||
if (name) {
|
||||
struct filename *tmp = getname(name);
|
||||
|
||||
if (IS_ERR(tmp))
|
||||
return PTR_ERR(tmp);
|
||||
mutex_lock(&acct_on_mutex);
|
||||
@ -390,7 +391,8 @@ static u32 encode_float(u64 value)
|
||||
unsigned exp = 190;
|
||||
unsigned u;
|
||||
|
||||
if (value==0) return 0;
|
||||
if (value == 0)
|
||||
return 0;
|
||||
while ((s64)value > 0) {
|
||||
value <<= 1;
|
||||
exp--;
|
||||
@ -439,6 +441,7 @@ static void fill_ac(acct_t *ac)
|
||||
{
|
||||
/* new enlarged etime field */
|
||||
comp2_t etime = encode_comp2_t(elapsed);
|
||||
|
||||
ac->ac_etime_hi = etime >> 16;
|
||||
ac->ac_etime_lo = (u16) etime;
|
||||
}
|
||||
@ -530,6 +533,7 @@ void acct_collect(long exitcode, int group_dead)
|
||||
|
||||
if (group_dead && current->mm) {
|
||||
struct vm_area_struct *vma;
|
||||
|
||||
down_read(¤t->mm->mmap_sem);
|
||||
vma = current->mm->mmap;
|
||||
while (vma) {
|
||||
|
Loading…
Reference in New Issue
Block a user