Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
None
-
9223372036854775807
Description
When upstream kernel moved to file->f_path.dentry and friends, a couple of very convenient wrappers were added:
file_dentry(file) would return a dentry of the file
file_inode(file) would return inode of the file.
Using those instead of the huge monstrosity we have now is probably better, just need to create compat wrappers for code that does not have it yet.
static inline struct inode *file_inode(const struct file *f) { return f->f_inode; } static inline struct dentry *file_dentry(const struct file *file) { struct dentry *dentry = file->f_path.dentry; if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) return dentry->d_op->d_real(dentry, file_inode(file)); else return dentry; }
Attachments
Issue Links
- is related to
-
LU-8352 Mellanox/OFED build breakage due to file_inode macro.
- Resolved