Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * dcache.h
0004  *
0005  * Function prototypes
0006  *
0007  * Copyright (C) 2002, 2004 Oracle.  All rights reserved.
0008  */
0009 
0010 #ifndef OCFS2_DCACHE_H
0011 #define OCFS2_DCACHE_H
0012 
0013 extern const struct dentry_operations ocfs2_dentry_ops;
0014 
0015 struct ocfs2_dentry_lock {
0016     unsigned int        dl_count;
0017     u64         dl_parent_blkno;
0018 
0019     /*
0020      * The ocfs2_dentry_lock keeps an inode reference until
0021      * dl_lockres has been destroyed. This is usually done in
0022      * ->d_iput() anyway, so there should be minimal impact.
0023      */
0024     struct inode        *dl_inode;
0025     struct ocfs2_lock_res   dl_lockres;
0026 };
0027 
0028 int ocfs2_dentry_attach_lock(struct dentry *dentry, struct inode *inode,
0029                  u64 parent_blkno);
0030 
0031 void ocfs2_dentry_lock_put(struct ocfs2_super *osb,
0032                struct ocfs2_dentry_lock *dl);
0033 
0034 struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno,
0035                       int skip_unhashed);
0036 
0037 void ocfs2_dentry_move(struct dentry *dentry, struct dentry *target,
0038                struct inode *old_dir, struct inode *new_dir);
0039 
0040 extern spinlock_t dentry_attach_lock;
0041 void ocfs2_dentry_attach_gen(struct dentry *dentry);
0042 
0043 #endif /* OCFS2_DCACHE_H */