[RFC PATCH 5/5] locks: show private lock types in /proc/locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Show "private" locks in /proc/locks with a 'P' suffix.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
 fs/locks.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/locks.c b/fs/locks.c
index 3bde157..31abb70 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2393,8 +2393,8 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
 	} else {
 		seq_printf(f, "%s ",
 			       (lease_breaking(fl))
-			       ? (fl->fl_type == F_UNLCK) ? "UNLCK" : "READ "
-			       : (fl->fl_type == F_WRLCK) ? "WRITE" : "READ ");
+			       ? (fl->fl_type == F_UNLCK) ? "UNLCK " : (IS_PRIVATE(fl) ? "READP " : "READ  ")
+			       : (fl->fl_type == F_WRLCK) ?  (IS_PRIVATE(fl) ? "WRITEP" : "WRITE ") : IS_PRIVATE(fl) ? "READP " : "READ  ");
 	}
 	if (inode) {
 #ifdef WE_CAN_BREAK_LSLK_NOW
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux