Skip to contentSkip to conversation

->i_dev switched to dev_t

PATCH Matthew Wilcox 1 participant 1 message Jul 5, 2002

lore
Share & tools
lore
#0 lore raw

[apologies for the mangling; this is what happens when you have to copy and paste from a web archive]

Quoted 3 lines · you

* ->i_dev followed the example of ->s_dev - it's dev_t now. All
remaining uses of ->i_dev either outright want dev_t (stat()) or couldn't care less (printing major:minor in /proc/<pid>/maps, etc.)

[...]

Quoted 7 lines

diff -urN C24-0/fs/locks.c C24-current/fs/locks.c

fs/locks.c Wed Jul 3 04:26:31 2002 renamed from fs/locks.c Thu Jun 20 13:37:25 2002 +0 -0
@@ -1751,9 +1751,12 @@
                                ? (fl->fl_type & F_UNLCK) ? "UNLCK" : "READ "
                                : (fl->fl_type & F_WRLCK) ? "WRITE" : "READ ");
         }

fs/locks.c Wed Jul 3 04:26:31 2002 line 1762

Quoted 10 lines
fs/locks.c Wed Jul 3 04:26:31 2002 renamed from fs/locks.c Thu Jun 20 13:37:25 2002 +4 -1
+ /*
+ * NOTE: it should be inode->i_sb->s_id, not kdevname(...).
+ */
         out += sprintf(out, "%d %s:%ld ",
                      fl->fl_pid,
- inode ? kdevname(inode->i_dev) : "<none>",
+ inode ? kdevname(to_kdev_t(inode->i_dev)) : "<none>",
                      inode ? inode->i_ino : 0);
         out += sprintf(out, "%Ld ", fl->fl_start);
         if (fl->fl_end == OFFSET_MAX)

why not:

fs/locks.c Wed Jul 3 04:26:31 2002

Quoted 5 lines
fs/locks.c Wed Jul 3 04:26:31 2002 renamed from fs/locks.c Thu Jun 20 13:37:25 2002 +2 -2
-        out += sprintf(out, "%d %s:%ld ",
+        out += sprintf(out, "%d %02x:%02x:%ld ",
                      fl->fl_pid,
- inode ? kdevname(inode->i_dev) : "<none>",
+ inode ? MAJOR(inode->i_dev), MINOR(inode->i_dev) : "<none>",

you've done things like this elsewhere where you didn't want to change the format of a file in /proc yet.

Signature · 1 line
Revolutions do not require corporate support.