fs_stack.h 811 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_FS_STACK_H
  3. #define _LINUX_FS_STACK_H
  4. /* This file defines generic functions used primarily by stackable
  5. * filesystems; none of these functions require i_mutex to be held.
  6. */
  7. #include <linux/fs.h>
  8. /* externs for fs/stack.c */
  9. extern void fsstack_copy_attr_all(struct inode *dest, const struct inode *src);
  10. extern void fsstack_copy_inode_size(struct inode *dst, struct inode *src);
  11. /* inlines */
  12. static inline void fsstack_copy_attr_atime(struct inode *dest,
  13. const struct inode *src)
  14. {
  15. dest->i_atime = src->i_atime;
  16. }
  17. static inline void fsstack_copy_attr_times(struct inode *dest,
  18. const struct inode *src)
  19. {
  20. dest->i_atime = src->i_atime;
  21. dest->i_mtime = src->i_mtime;
  22. dest->i_ctime = src->i_ctime;
  23. }
  24. #endif /* _LINUX_FS_STACK_H */