Skip to contentSkip to conversation

VFS: Convert file->f_dentry->d_inode to file_inode()

PATCH In review David Howells 3 participants 4 messages Jan 13, 2015 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 VFS: Convert file->f_dentry->d_inode to file_inode()

Convert file->f_dentry->d_inode to file_inode() so as to get layered filesystems right.

Found with: git grep '[.>]f_dentry'

---

 arch/cris/arch-v32/drivers/sync_serial.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/cris/arch-v32/drivers/sync_serial.c +1 -1
index 08a313fc2241..e9b6de2b46a0 100644
@@ -604,7 +604,7 @@ static ssize_t __sync_serial_read(struct file *file,
 				  struct timespec *ts)
 {
 	unsigned long flags;
-	int dev = MINOR(file->f_dentry->d_inode->i_rdev);
+	int dev = MINOR(file_inode(file_inode)->i_rdev);
 	int avail;
 	struct sync_port *port;
 	unsigned char *start;
maintainer
#1 lore raw
Quoted 4 lines · David Howells

Convert file->f_dentry->d_inode to file_inode() so as to get layered filesystems right.

Found with: git grep '[.>]f_dentry'

ACK. I wonder how that got missed during f_dentry elimination - even the macro is gone these days...

#2 lore raw
In reply to David Howells
Quoted 16 lines · David Howells

Convert file->f_dentry->d_inode to file_inode() so as to get layered filesystems right.

Found with: git grep '[.>]f_dentry'

---

 arch/cris/arch-v32/drivers/sync_serial.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/cris/arch-v32/drivers/sync_serial.c +0 -0
index 08a313fc2241..e9b6de2b46a0 100644

arch/cris/arch-v32/drivers/sync_serial.c static ssize_t __sync_serial_read(struct file *file, · line 607

Quoted 5 lines
arch/cris/arch-v32/drivers/sync_serial.c +1 -1
@@ -604,7 +604,7 @@ static ssize_t __sync_serial_read(struct file *file,
                                  struct timespec *ts)
 {
        unsigned long flags;
-       int dev = MINOR(file->f_dentry->d_inode->i_rdev);
+       int dev = MINOR(file_inode(file_inode)->i_rdev);

Shouldn't that be file_inode(file) ?

Quoted 9 lines
arch/cris/arch-v32/drivers/sync_serial.c +0 -1
        int avail;
        struct sync_port *port;
        unsigned char *start;
 
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Marc

#3 lore raw
Quoted 1 line · Marc Dionne

Shouldn't that be file_inode(file) ?

Bah, yes.