blob: 7f246c5692d82c48a2e542830e5d6709e5fcd9cd [file] [log] [blame]
Thomas Gleixner328970d2019-05-24 12:04:05 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Masahiro Yamadafa60ce22021-05-06 18:06:44 -07002/*
Mark Fashehccd979b2005-12-15 14:31:24 -08003 * dcache.h
4 *
5 * Function prototypes
6 *
7 * Copyright (C) 2002, 2004 Oracle. All rights reserved.
Mark Fashehccd979b2005-12-15 14:31:24 -08008 */
9
10#ifndef OCFS2_DCACHE_H
11#define OCFS2_DCACHE_H
12
Al Virod8fba0f2009-02-20 06:00:26 +000013extern const struct dentry_operations ocfs2_dentry_ops;
Mark Fashehccd979b2005-12-15 14:31:24 -080014
Mark Fashehd680efe2006-09-08 14:14:34 -070015struct ocfs2_dentry_lock {
16 unsigned int dl_count;
Goldwyn Rodrigues8ed6b232014-04-03 14:46:59 -070017 u64 dl_parent_blkno;
Mark Fashehd680efe2006-09-08 14:14:34 -070018
19 /*
20 * The ocfs2_dentry_lock keeps an inode reference until
21 * dl_lockres has been destroyed. This is usually done in
22 * ->d_iput() anyway, so there should be minimal impact.
23 */
24 struct inode *dl_inode;
25 struct ocfs2_lock_res dl_lockres;
26};
27
Mark Fasheh80c05842006-09-08 14:43:18 -070028int ocfs2_dentry_attach_lock(struct dentry *dentry, struct inode *inode,
Mark Fasheh0027dd52006-09-21 16:51:28 -070029 u64 parent_blkno);
Mark Fashehd680efe2006-09-08 14:14:34 -070030
Mark Fasheh80c05842006-09-08 14:43:18 -070031void ocfs2_dentry_lock_put(struct ocfs2_super *osb,
32 struct ocfs2_dentry_lock *dl);
33
34struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno,
35 int skip_unhashed);
36
37void ocfs2_dentry_move(struct dentry *dentry, struct dentry *target,
38 struct inode *old_dir, struct inode *new_dir);
Mark Fashehd680efe2006-09-08 14:14:34 -070039
40extern spinlock_t dentry_attach_lock;
Goldwyn Rodrigues5e98d492010-06-28 10:04:32 -050041void ocfs2_dentry_attach_gen(struct dentry *dentry);
Mark Fashehd680efe2006-09-08 14:14:34 -070042
Mark Fashehccd979b2005-12-15 14:31:24 -080043#endif /* OCFS2_DCACHE_H */