Messages in this thread | | | Date | Thu, 23 Feb 2012 13:54:48 +0200 | Subject | Re: + locks-new-proc-lockinfo.patch added to -mm tree | From | Alexey Dobriyan <> |
| |
On Wed, Feb 22, 2012 at 12:06 AM, <akpm@linux-foundation.org> wrote: > +static void lockinfo_get_status(struct seq_file *f, struct file_lock *fl,
All caps sucks.
> + if (fl->fl_type & LOCK_MAND) { > + seq_printf(f, "Access:\t\t %s\n", > + (fl->fl_type & LOCK_READ) > + ? (fl->fl_type & LOCK_WRITE) ? "RW " : "READ " > + : (fl->fl_type & LOCK_WRITE) ? "WRITE" : "NONE ");
I think using one of --, r-, -w, rw is nicer. Trailing whitespace, why?
> + } else { > + seq_printf(f, "Access:\t\t %s\n", > + (lease_breaking(fl)) > + ? (fl->fl_type & F_UNLCK) ? "UNLCK" : "READ " > + : (fl->fl_type & F_WRLCK) ? "WRITE" : "READ ");
Trailing whitespace.
> + if (IS_POSIX(fl)) { > + if (fl->fl_end == OFFSET_MAX) > + seq_printf(f, "Start-end:\t %Ld-EOF\n\n", fl->fl_start); > + else > + seq_printf(f, "Start-end:\t %Ld-%Ld\n\n", fl->fl_start, fl->fl_end); > + } else { > + seq_printf(f, "Start-end:\t 0-EOF\n\n");
Separate start/end or range, if you want to keep it on one line.
| |