Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_FS_STACK_H
0003 #define _LINUX_FS_STACK_H
0004 
0005 /* This file defines generic functions used primarily by stackable
0006  * filesystems; none of these functions require i_mutex to be held.
0007  */
0008 
0009 #include <linux/fs.h>
0010 
0011 /* externs for fs/stack.c */
0012 extern void fsstack_copy_attr_all(struct inode *dest, const struct inode *src);
0013 extern void fsstack_copy_inode_size(struct inode *dst, struct inode *src);
0014 
0015 /* inlines */
0016 static inline void fsstack_copy_attr_atime(struct inode *dest,
0017                        const struct inode *src)
0018 {
0019     dest->i_atime = src->i_atime;
0020 }
0021 
0022 static inline void fsstack_copy_attr_times(struct inode *dest,
0023                        const struct inode *src)
0024 {
0025     dest->i_atime = src->i_atime;
0026     dest->i_mtime = src->i_mtime;
0027     dest->i_ctime = src->i_ctime;
0028 }
0029 
0030 #endif /* _LINUX_FS_STACK_H */