Skip to contentSkip to conversation

VFS: Convert file->f_dentry->d_inode to file_inode() [ver #2]

PATCH In review David Howells 2 participants 3 messages Jan 13, 2015 – Jan 19, 2015 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 VFS: Convert file->f_dentry->d_inode to file_inode() [ver #2]

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..f772068d9e79 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)->i_rdev);
 	int avail;
 	struct sync_port *port;
 	unsigned char *start;
Reviewed-by on v1 1/1
#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'

Yes, compile works with this patch. Do you want me to take it through the CRIS tree or do you have any other tree in mind?

Quoted 1 line

In any case:

Quoted 9 lines
 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..f772068d9e79 100644

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

Quoted 8 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)->i_rdev);
 	int avail;
 	struct sync_port *port;
 	unsigned char *start;

/^JN - Jesper Nilsson

Signature · 1 line
               Jesper Nilsson -- [email protected]
#2 lore raw
Quoted 2 lines · Jesper Nilsson

Yes, compile works with this patch. Do you want me to take it through the CRIS tree or do you have any other tree in mind?

I can take it.

David