linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Matthew Wilcox <matthew@wil.cx>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>, akpm@linux-foundation.org
Subject: [PATCH] locks: export device name
Date: Fri, 10 Feb 2012 22:06:07 +0100	[thread overview]
Message-ID: <1328907967.3138.1.camel@offbook> (raw)

From: Davidlohr Bueso <dave@gnu.org>

The lslk(8) program has not been maintained for over a decade and has recently been rewritten as lslocks(8).
It will be available for the next 2.22 release, in a couple of months. This is a good opportunity to delete
that nasty WE_CAN_BREAK_LSLK_NOW and start exporting the device name instead of the maj:min numbers.

For backward compatibility the new version can be in charge of checking older kernel versions and parsing the old
output if necessary.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 fs/locks.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/fs/locks.c b/fs/locks.c
index 637694b..2b01907 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2199,15 +2199,8 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
 			       : (fl->fl_type & F_WRLCK) ? "WRITE" : "READ ");
 	}
 	if (inode) {
-#ifdef WE_CAN_BREAK_LSLK_NOW
 		seq_printf(f, "%d %s:%ld ", fl_pid,
 				inode->i_sb->s_id, inode->i_ino);
-#else
-		/* userspace relies on this representation of dev_t ;-( */
-		seq_printf(f, "%d %02x:%02x:%ld ", fl_pid,
-				MAJOR(inode->i_sb->s_dev),
-				MINOR(inode->i_sb->s_dev), inode->i_ino);
-#endif
 	} else {
 		seq_printf(f, "%d <none>:0 ", fl_pid);
 	}
-- 
1.7.4.1

             reply	other threads:[~2012-02-10 21:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10 21:06 Davidlohr Bueso [this message]
2012-02-14  0:34 ` [PATCH] locks: export device name Andrew Morton
2012-02-14 19:09   ` J. Bruce Fields
2012-02-15 10:52     ` Davidlohr Bueso
2012-02-15 12:42       ` J. Bruce Fields
2012-02-15 20:39         ` Andrew Morton
2012-02-16 22:37           ` Davidlohr Bueso
2012-02-16 22:59             ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328907967.3138.1.camel@offbook \
    --to=dave@gnu.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).