dcache.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * dcache.h
  4. *
  5. * Function prototypes
  6. *
  7. * Copyright (C) 2002, 2004 Oracle. All rights reserved.
  8. */
  9. #ifndef OCFS2_DCACHE_H
  10. #define OCFS2_DCACHE_H
  11. extern const struct dentry_operations ocfs2_dentry_ops;
  12. struct ocfs2_dentry_lock {
  13. unsigned int dl_count;
  14. u64 dl_parent_blkno;
  15. /*
  16. * The ocfs2_dentry_lock keeps an inode reference until
  17. * dl_lockres has been destroyed. This is usually done in
  18. * ->d_iput() anyway, so there should be minimal impact.
  19. */
  20. struct inode *dl_inode;
  21. struct ocfs2_lock_res dl_lockres;
  22. };
  23. int ocfs2_dentry_attach_lock(struct dentry *dentry, struct inode *inode,
  24. u64 parent_blkno);
  25. void ocfs2_dentry_lock_put(struct ocfs2_super *osb,
  26. struct ocfs2_dentry_lock *dl);
  27. struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno,
  28. int skip_unhashed);
  29. void ocfs2_dentry_move(struct dentry *dentry, struct dentry *target,
  30. struct inode *old_dir, struct inode *new_dir);
  31. extern spinlock_t dentry_attach_lock;
  32. void ocfs2_dentry_attach_gen(struct dentry *dentry);
  33. #endif /* OCFS2_DCACHE_H */