[PATCH] fs/open.c: use ->f_mapping instead of ->f_mapping->host->i_mapping

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

 



From: Eric Biggers <ebiggers@xxxxxxxxxx>

In do_dentry_open(), initialize the readahead state using ->f_mapping
instead of ->f_mapping->host->i_mapping.  This is equivalent, even for
block device files; we don't need the extra indirection because
->f_mapping already represents the data read/written by the file (which
for block device nodes is the underlying block device mapping).

Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
---
 fs/open.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/open.c b/fs/open.c
index 949cef29c3bb..32e19fda24d2 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -763,7 +763,7 @@ static int do_dentry_open(struct file *f,
 
 	f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
 
-	file_ra_state_init(&f->f_ra, f->f_mapping->host->i_mapping);
+	file_ra_state_init(&f->f_ra, f->f_mapping);
 
 	return 0;
 
-- 
2.12.1




[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