mm: add file_inode for easier backporting
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 16 Sep 2017 21:28:35 +0000 (00:28 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 16 Sep 2017 21:29:31 +0000 (00:29 +0300)
include/linux/fs.h

index b2ccd1e..52c56f1 100644 (file)
@@ -1977,6 +1977,11 @@ extern bool our_mnt(struct vfsmount *mnt);
 
 extern int current_umask(void);
 
+static inline struct inode *file_inode(struct file *f)
+{
+       return f->f_dentry->d_inode;
+}
+
 /* /sys/fs */
 extern struct kobject *fs_kobj;