The patch backports upstream commit 54d5ca871e72f2bb172ec9323497f01cd5091ec7:

>    vfs: add vfs_select_inode() helper
>
>    Signed-off-by: Miklos Szeredi <[email protected]>

The part about vfs_open is omitted because we don't use
d_op->d_select_inode() there. Our version of vfs_select_inode()
doesn't have "open_flags" arg because our d_select_inode()
doesn't have it.

https://jira.sw.ru/browse/PSBM-47981

Signed-off-by: Maxim Patlasov <[email protected]>
---
 include/linux/dcache.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 267dbc6..897814a 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -529,4 +529,14 @@ static inline struct dentry *d_backing_dentry(struct 
dentry *upper)
        return upper;
 }
 
+static inline struct inode *vfs_select_inode(struct dentry *dentry)
+{
+       struct inode *inode = d_inode(dentry);
+
+       if (inode && unlikely(dentry->d_flags & DCACHE_OP_SELECT_INODE))
+               inode = dentry->d_op->d_select_inode(dentry);
+
+       return inode;
+}
+
 #endif /* __LINUX_DCACHE_H */

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to