Skip to content

Commit

Permalink
fs/locks.c: replace seq_printf by seq_puts
Browse files Browse the repository at this point in the history
Replace seq_printf where possible

Cc: Jeff Layton <jlayton@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jeff Layton <jlayton@poochiereds.net>
Change-Id: Ibfb056d150d62036a6187852f0ee57e7c2ecfe62
  • Loading branch information
Fabian Frederick authored and rlawoehd187 committed Mar 9, 2023
1 parent 446f0fd commit 4c337c4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -2434,31 +2434,31 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
seq_printf(f, "%lld:%s ", id, pfx);
if (IS_POSIX(fl)) {
if (fl->fl_flags & FL_ACCESS)
seq_printf(f, "ACCESS");
seq_puts(f, "ACCESS");
else if (IS_OFDLCK(fl))
seq_printf(f, "OFDLCK");
seq_puts(f, "OFDLCK");
else
seq_printf(f, "POSIX ");
seq_puts(f, "POSIX ");

seq_printf(f, " %s ",
(inode == NULL) ? "*NOINODE*" :
mandatory_lock(inode) ? "MANDATORY" : "ADVISORY ");
} else if (IS_FLOCK(fl)) {
if (fl->fl_type & LOCK_MAND) {
seq_printf(f, "FLOCK MSNFS ");
seq_puts(f, "FLOCK MSNFS ");
} else {
seq_printf(f, "FLOCK ADVISORY ");
seq_puts(f, "FLOCK ADVISORY ");
}
} else if (IS_LEASE(fl)) {
seq_printf(f, "LEASE ");
seq_puts(f, "LEASE ");
if (lease_breaking(fl))
seq_printf(f, "BREAKING ");
seq_puts(f, "BREAKING ");
else if (fl->fl_file)
seq_printf(f, "ACTIVE ");
seq_puts(f, "ACTIVE ");
else
seq_printf(f, "BREAKER ");
seq_puts(f, "BREAKER ");
} else {
seq_printf(f, "UNKNOWN UNKNOWN ");
seq_puts(f, "UNKNOWN UNKNOWN ");
}
if (fl->fl_type & LOCK_MAND) {
seq_printf(f, "%s ",
Expand Down Expand Up @@ -2490,7 +2490,7 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
else
seq_printf(f, "%Ld %Ld\n", fl->fl_start, fl->fl_end);
} else {
seq_printf(f, "0 EOF\n");
seq_puts(f, "0 EOF\n");
}
}

Expand Down

0 comments on commit 4c337c4

Please sign in to comment.