2 * Copyright (C) 2005-2016 Junjiro R. Okajima
4 * This program, aufs is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef __AUFS_INODE_H__
23 #define __AUFS_INODE_H__
27 #include <linux/fsnotify.h>
33 #ifdef CONFIG_AUFS_HNOTIFY
34 #ifdef CONFIG_AUFS_HFSNOTIFY
35 /* never use fsnotify_add_vfsmount_mark() */
36 struct fsnotify_mark hn_mark
;
39 struct inode
*hn_aufs_inode
; /* no get/put */
40 struct llist_node hn_lnode
; /* delayed free */
43 } ____cacheline_aligned_in_smp
;
46 struct inode
*hi_inode
;
48 #ifdef CONFIG_AUFS_HNOTIFY
49 struct au_hnotify
*hi_notify
;
52 /* reference to the copied-up whiteout with get/put */
53 struct dentry
*hi_whdentry
;
57 #define AuIG_HALF_REFRESHED 1
58 #define au_ig_ftest(flags, name) ((flags) & AuIG_##name)
59 #define au_ig_fset(flags, name) \
60 do { (flags) |= AuIG_##name; } while (0)
61 #define au_ig_fclr(flags, name) \
62 do { (flags) &= ~AuIG_##name; } while (0)
66 __u32 ig_generation
, ig_flags
;
71 struct au_iigen ii_generation
;
72 struct super_block
*ii_hsb1
; /* no get/put */
74 struct au_rwsem ii_rwsem
;
75 aufs_bindex_t ii_btop
, ii_bbot
;
77 struct au_hinode
*ii_hinode
;
78 struct au_vdir
*ii_vdir
;
82 struct au_iinfo iinfo
;
83 struct inode vfs_inode
;
85 struct hlist_node plink
;
86 struct llist_node lnode
; /* delayed free */
88 } ____cacheline_aligned_in_smp
;
91 #define AuPin_DI_LOCKED 1
92 #define AuPin_MNT_WRITE (1 << 1)
93 #define au_ftest_pin(flags, name) ((flags) & AuPin_##name)
94 #define au_fset_pin(flags, name) \
95 do { (flags) |= AuPin_##name; } while (0)
96 #define au_fclr_pin(flags, name) \
97 do { (flags) &= ~AuPin_##name; } while (0)
101 struct dentry
*dentry
;
103 unsigned char lsc_di
, lsc_hi
, flags
;
104 aufs_bindex_t bindex
;
107 struct dentry
*parent
;
108 struct au_hinode
*hdir
;
109 struct vfsmount
*h_mnt
;
111 /* temporary unlock/relock for copyup */
112 struct dentry
*h_dentry
, *h_parent
;
113 struct au_branch
*br
;
114 struct task_struct
*task
;
117 void au_pin_hdir_unlock(struct au_pin
*p
);
118 int au_pin_hdir_lock(struct au_pin
*p
);
119 int au_pin_hdir_relock(struct au_pin
*p
);
120 void au_pin_hdir_acquire_nest(struct au_pin
*p
);
121 void au_pin_hdir_release(struct au_pin
*p
);
123 /* ---------------------------------------------------------------------- */
125 static inline struct au_iinfo
*au_ii(struct inode
*inode
)
127 BUG_ON(is_bad_inode(inode
));
128 return &(container_of(inode
, struct au_icntnr
, vfs_inode
)->iinfo
);
131 /* ---------------------------------------------------------------------- */
134 struct inode
*au_igrab(struct inode
*inode
);
135 void au_refresh_iop(struct inode
*inode
, int force_getattr
);
136 int au_refresh_hinode_self(struct inode
*inode
);
137 int au_refresh_hinode(struct inode
*inode
, struct dentry
*dentry
);
138 int au_ino(struct super_block
*sb
, aufs_bindex_t bindex
, ino_t h_ino
,
139 unsigned int d_type
, ino_t
*ino
);
140 struct inode
*au_new_inode(struct dentry
*dentry
, int must_new
);
141 int au_test_ro(struct super_block
*sb
, aufs_bindex_t bindex
,
142 struct inode
*inode
);
143 int au_test_h_perm(struct inode
*h_inode
, int mask
);
144 int au_test_h_perm_sio(struct inode
*h_inode
, int mask
);
146 static inline int au_wh_ino(struct super_block
*sb
, aufs_bindex_t bindex
,
147 ino_t h_ino
, unsigned int d_type
, ino_t
*ino
)
149 #ifdef CONFIG_AUFS_SHWH
150 return au_ino(sb
, bindex
, h_ino
, d_type
, ino
);
163 extern struct inode_operations aufs_iop
[AuIop_Last
],
164 aufs_iop_nogetattr
[AuIop_Last
];
166 /* au_wr_dir flags */
167 #define AuWrDir_ADD_ENTRY 1
168 #define AuWrDir_ISDIR (1 << 1)
169 #define AuWrDir_TMPFILE (1 << 2)
170 #define au_ftest_wrdir(flags, name) ((flags) & AuWrDir_##name)
171 #define au_fset_wrdir(flags, name) \
172 do { (flags) |= AuWrDir_##name; } while (0)
173 #define au_fclr_wrdir(flags, name) \
174 do { (flags) &= ~AuWrDir_##name; } while (0)
176 struct au_wr_dir_args
{
177 aufs_bindex_t force_btgt
;
180 int au_wr_dir(struct dentry
*dentry
, struct dentry
*src_dentry
,
181 struct au_wr_dir_args
*args
);
183 struct dentry
*au_pinned_h_parent(struct au_pin
*pin
);
184 void au_pin_init(struct au_pin
*pin
, struct dentry
*dentry
,
185 aufs_bindex_t bindex
, int lsc_di
, int lsc_hi
,
186 unsigned int udba
, unsigned char flags
);
187 int au_pin(struct au_pin
*pin
, struct dentry
*dentry
, aufs_bindex_t bindex
,
188 unsigned int udba
, unsigned char flags
) __must_check
;
189 int au_do_pin(struct au_pin
*pin
) __must_check
;
190 void au_unpin(struct au_pin
*pin
);
191 int au_reval_for_attr(struct dentry
*dentry
, unsigned int sigen
);
193 #define AuIcpup_DID_CPUP 1
194 #define au_ftest_icpup(flags, name) ((flags) & AuIcpup_##name)
195 #define au_fset_icpup(flags, name) \
196 do { (flags) |= AuIcpup_##name; } while (0)
197 #define au_fclr_icpup(flags, name) \
198 do { (flags) &= ~AuIcpup_##name; } while (0)
200 struct au_icpup_args
{
202 unsigned char pin_flags
;
207 struct inode
*h_inode
;
210 int au_pin_and_icpup(struct dentry
*dentry
, struct iattr
*ia
,
211 struct au_icpup_args
*a
);
213 int au_h_path_getattr(struct dentry
*dentry
, int force
, struct path
*h_path
);
216 int au_may_add(struct dentry
*dentry
, aufs_bindex_t bindex
,
217 struct dentry
*h_parent
, int isdir
);
218 int aufs_mknod(struct inode
*dir
, struct dentry
*dentry
, umode_t mode
,
220 int aufs_symlink(struct inode
*dir
, struct dentry
*dentry
, const char *symname
);
221 int aufs_create(struct inode
*dir
, struct dentry
*dentry
, umode_t mode
,
223 struct vfsub_aopen_args
;
224 int au_aopen_or_create(struct inode
*dir
, struct dentry
*dentry
,
225 struct vfsub_aopen_args
*args
);
226 int aufs_tmpfile(struct inode
*dir
, struct dentry
*dentry
, umode_t mode
);
227 int aufs_link(struct dentry
*src_dentry
, struct inode
*dir
,
228 struct dentry
*dentry
);
229 int aufs_mkdir(struct inode
*dir
, struct dentry
*dentry
, umode_t mode
);
232 int au_wr_dir_need_wh(struct dentry
*dentry
, int isdir
, aufs_bindex_t
*bcpup
);
233 int au_may_del(struct dentry
*dentry
, aufs_bindex_t bindex
,
234 struct dentry
*h_parent
, int isdir
);
235 int aufs_unlink(struct inode
*dir
, struct dentry
*dentry
);
236 int aufs_rmdir(struct inode
*dir
, struct dentry
*dentry
);
239 int au_wbr(struct dentry
*dentry
, aufs_bindex_t btgt
);
240 int aufs_rename(struct inode
*src_dir
, struct dentry
*src_dentry
,
241 struct inode
*dir
, struct dentry
*dentry
);
244 struct inode
*au_h_iptr(struct inode
*inode
, aufs_bindex_t bindex
);
245 void au_hiput(struct au_hinode
*hinode
);
246 void au_set_hi_wh(struct inode
*inode
, aufs_bindex_t bindex
,
247 struct dentry
*h_wh
);
248 unsigned int au_hi_flags(struct inode
*inode
, int isdir
);
252 #define AuHi_HNOTIFY (1 << 1)
253 #define au_ftest_hi(flags, name) ((flags) & AuHi_##name)
254 #define au_fset_hi(flags, name) \
255 do { (flags) |= AuHi_##name; } while (0)
256 #define au_fclr_hi(flags, name) \
257 do { (flags) &= ~AuHi_##name; } while (0)
259 #ifndef CONFIG_AUFS_HNOTIFY
261 #define AuHi_HNOTIFY 0
264 void au_set_h_iptr(struct inode
*inode
, aufs_bindex_t bindex
,
265 struct inode
*h_inode
, unsigned int flags
);
267 void au_update_iigen(struct inode
*inode
, int half
);
268 void au_update_ibrange(struct inode
*inode
, int do_put_zero
);
270 void au_icntnr_init_once(void *_c
);
271 void au_hinode_init(struct au_hinode
*hinode
);
272 int au_iinfo_init(struct inode
*inode
);
273 void au_iinfo_fin(struct inode
*inode
);
274 int au_hinode_realloc(struct au_iinfo
*iinfo
, int nbr
, int may_shrink
);
276 #ifdef CONFIG_PROC_FS
278 int au_plink_maint(struct super_block
*sb
, int flags
);
280 void au_plink_maint_leave(struct au_sbinfo
*sbinfo
);
281 int au_plink_maint_enter(struct super_block
*sb
);
282 #ifdef CONFIG_AUFS_DEBUG
283 void au_plink_list(struct super_block
*sb
);
285 AuStubVoid(au_plink_list
, struct super_block
*sb
)
287 int au_plink_test(struct inode
*inode
);
288 struct dentry
*au_plink_lkup(struct inode
*inode
, aufs_bindex_t bindex
);
289 void au_plink_append(struct inode
*inode
, aufs_bindex_t bindex
,
290 struct dentry
*h_dentry
);
291 void au_plink_put(struct super_block
*sb
, int verbose
);
292 void au_plink_clean(struct super_block
*sb
, int verbose
);
293 void au_plink_half_refresh(struct super_block
*sb
, aufs_bindex_t br_id
);
295 AuStubInt0(au_plink_maint
, struct super_block
*sb
, int flags
);
296 AuStubVoid(au_plink_maint_leave
, struct au_sbinfo
*sbinfo
);
297 AuStubInt0(au_plink_maint_enter
, struct super_block
*sb
);
298 AuStubVoid(au_plink_list
, struct super_block
*sb
);
299 AuStubInt0(au_plink_test
, struct inode
*inode
);
300 AuStub(struct dentry
*, au_plink_lkup
, return NULL
,
301 struct inode
*inode
, aufs_bindex_t bindex
);
302 AuStubVoid(au_plink_append
, struct inode
*inode
, aufs_bindex_t bindex
,
303 struct dentry
*h_dentry
);
304 AuStubVoid(au_plink_put
, struct super_block
*sb
, int verbose
);
305 AuStubVoid(au_plink_clean
, struct super_block
*sb
, int verbose
);
306 AuStubVoid(au_plink_half_refresh
, struct super_block
*sb
, aufs_bindex_t br_id
);
307 #endif /* CONFIG_PROC_FS */
309 #ifdef CONFIG_AUFS_XATTR
311 int au_cpup_xattr(struct dentry
*h_dst
, struct dentry
*h_src
, int ignore_flags
,
312 unsigned int verbose
);
313 ssize_t
aufs_listxattr(struct dentry
*dentry
, char *list
, size_t size
);
314 ssize_t
aufs_getxattr(struct dentry
*dentry
, struct inode
*inode
,
315 const char *name
, void *value
, size_t size
);
316 int aufs_setxattr(struct dentry
*dentry
, struct inode
*inode
, const char *name
,
317 const void *value
, size_t size
, int flags
);
318 int aufs_removexattr(struct dentry
*dentry
, const char *name
);
320 /* void au_xattr_init(struct super_block *sb); */
322 AuStubInt0(au_cpup_xattr
, struct dentry
*h_dst
, struct dentry
*h_src
,
323 int ignore_flags
, unsigned int verbose
);
324 /* AuStubVoid(au_xattr_init, struct super_block *sb); */
327 #ifdef CONFIG_FS_POSIX_ACL
328 struct posix_acl
*aufs_get_acl(struct inode
*inode
, int type
);
329 int aufs_set_acl(struct inode
*inode
, struct posix_acl
*acl
, int type
);
332 #if IS_ENABLED(CONFIG_AUFS_XATTR) || IS_ENABLED(CONFIG_FS_POSIX_ACL)
352 struct posix_acl
*acl
;
357 ssize_t
au_srxattr(struct dentry
*dentry
, struct inode
*inode
,
358 struct au_srxattr
*arg
);
361 /* ---------------------------------------------------------------------- */
363 /* lock subclass for iinfo */
365 AuLsc_II_CHILD
, /* child first */
366 AuLsc_II_CHILD2
, /* rename(2), link(2), and cpup at hnotify */
367 AuLsc_II_CHILD3
, /* copyup dirs */
368 AuLsc_II_PARENT
, /* see AuLsc_I_PARENT in vfsub.h */
370 AuLsc_II_PARENT3
, /* copyup dirs */
375 * ii_read_lock_child, ii_write_lock_child,
376 * ii_read_lock_child2, ii_write_lock_child2,
377 * ii_read_lock_child3, ii_write_lock_child3,
378 * ii_read_lock_parent, ii_write_lock_parent,
379 * ii_read_lock_parent2, ii_write_lock_parent2,
380 * ii_read_lock_parent3, ii_write_lock_parent3,
381 * ii_read_lock_new_child, ii_write_lock_new_child,
383 #define AuReadLockFunc(name, lsc) \
384 static inline void ii_read_lock_##name(struct inode *i) \
386 au_rw_read_lock_nested(&au_ii(i)->ii_rwsem, AuLsc_II_##lsc); \
389 #define AuWriteLockFunc(name, lsc) \
390 static inline void ii_write_lock_##name(struct inode *i) \
392 au_rw_write_lock_nested(&au_ii(i)->ii_rwsem, AuLsc_II_##lsc); \
395 #define AuRWLockFuncs(name, lsc) \
396 AuReadLockFunc(name, lsc) \
397 AuWriteLockFunc(name, lsc)
399 AuRWLockFuncs(child
, CHILD
);
400 AuRWLockFuncs(child2
, CHILD2
);
401 AuRWLockFuncs(child3
, CHILD3
);
402 AuRWLockFuncs(parent
, PARENT
);
403 AuRWLockFuncs(parent2
, PARENT2
);
404 AuRWLockFuncs(parent3
, PARENT3
);
405 AuRWLockFuncs(new_child
, NEW_CHILD
);
407 #undef AuReadLockFunc
408 #undef AuWriteLockFunc
412 * ii_read_unlock, ii_write_unlock, ii_downgrade_lock
414 AuSimpleUnlockRwsemFuncs(ii
, struct inode
*i
, &au_ii(i
)->ii_rwsem
);
416 #define IiMustNoWaiters(i) AuRwMustNoWaiters(&au_ii(i)->ii_rwsem)
417 #define IiMustAnyLock(i) AuRwMustAnyLock(&au_ii(i)->ii_rwsem)
418 #define IiMustWriteLock(i) AuRwMustWriteLock(&au_ii(i)->ii_rwsem)
420 /* ---------------------------------------------------------------------- */
422 static inline void au_icntnr_init(struct au_icntnr
*c
)
424 #ifdef CONFIG_AUFS_DEBUG
425 c
->vfs_inode
.i_mode
= 0;
429 static inline unsigned int au_iigen(struct inode
*inode
, unsigned int *igflags
)
432 struct au_iinfo
*iinfo
;
433 struct au_iigen
*iigen
;
435 iinfo
= au_ii(inode
);
436 iigen
= &iinfo
->ii_generation
;
437 spin_lock(&iigen
->ig_spin
);
439 *igflags
= iigen
->ig_flags
;
440 gen
= iigen
->ig_generation
;
441 spin_unlock(&iigen
->ig_spin
);
446 /* tiny test for inode number */
447 /* tmpfs generation is too rough */
448 static inline int au_test_higen(struct inode
*inode
, struct inode
*h_inode
)
450 struct au_iinfo
*iinfo
;
452 iinfo
= au_ii(inode
);
453 AuRwMustAnyLock(&iinfo
->ii_rwsem
);
454 return !(iinfo
->ii_hsb1
== h_inode
->i_sb
455 && iinfo
->ii_higen
== h_inode
->i_generation
);
458 static inline void au_iigen_dec(struct inode
*inode
)
460 struct au_iinfo
*iinfo
;
461 struct au_iigen
*iigen
;
463 iinfo
= au_ii(inode
);
464 iigen
= &iinfo
->ii_generation
;
465 spin_lock(&iigen
->ig_spin
);
466 iigen
->ig_generation
--;
467 spin_unlock(&iigen
->ig_spin
);
470 static inline int au_iigen_test(struct inode
*inode
, unsigned int sigen
)
475 if (unlikely(inode
&& au_iigen(inode
, NULL
) != sigen
))
481 /* ---------------------------------------------------------------------- */
483 static inline struct au_hinode
*au_hinode(struct au_iinfo
*iinfo
,
484 aufs_bindex_t bindex
)
486 return iinfo
->ii_hinode
+ bindex
;
489 static inline int au_is_bad_inode(struct inode
*inode
)
491 return !!(is_bad_inode(inode
) || !au_hinode(au_ii(inode
), 0));
494 static inline aufs_bindex_t
au_ii_br_id(struct inode
*inode
,
495 aufs_bindex_t bindex
)
497 IiMustAnyLock(inode
);
498 return au_hinode(au_ii(inode
), bindex
)->hi_id
;
501 static inline aufs_bindex_t
au_ibtop(struct inode
*inode
)
503 IiMustAnyLock(inode
);
504 return au_ii(inode
)->ii_btop
;
507 static inline aufs_bindex_t
au_ibbot(struct inode
*inode
)
509 IiMustAnyLock(inode
);
510 return au_ii(inode
)->ii_bbot
;
513 static inline struct au_vdir
*au_ivdir(struct inode
*inode
)
515 IiMustAnyLock(inode
);
516 return au_ii(inode
)->ii_vdir
;
519 static inline struct dentry
*au_hi_wh(struct inode
*inode
, aufs_bindex_t bindex
)
521 IiMustAnyLock(inode
);
522 return au_hinode(au_ii(inode
), bindex
)->hi_whdentry
;
525 static inline void au_set_ibtop(struct inode
*inode
, aufs_bindex_t bindex
)
527 IiMustWriteLock(inode
);
528 au_ii(inode
)->ii_btop
= bindex
;
531 static inline void au_set_ibbot(struct inode
*inode
, aufs_bindex_t bindex
)
533 IiMustWriteLock(inode
);
534 au_ii(inode
)->ii_bbot
= bindex
;
537 static inline void au_set_ivdir(struct inode
*inode
, struct au_vdir
*vdir
)
539 IiMustWriteLock(inode
);
540 au_ii(inode
)->ii_vdir
= vdir
;
543 static inline struct au_hinode
*au_hi(struct inode
*inode
, aufs_bindex_t bindex
)
545 IiMustAnyLock(inode
);
546 return au_hinode(au_ii(inode
), bindex
);
549 /* ---------------------------------------------------------------------- */
551 static inline struct dentry
*au_pinned_parent(struct au_pin
*pin
)
558 static inline struct inode
*au_pinned_h_dir(struct au_pin
*pin
)
560 if (pin
&& pin
->hdir
)
561 return pin
->hdir
->hi_inode
;
565 static inline struct au_hinode
*au_pinned_hdir(struct au_pin
*pin
)
572 static inline void au_pin_set_dentry(struct au_pin
*pin
, struct dentry
*dentry
)
575 pin
->dentry
= dentry
;
578 static inline void au_pin_set_parent_lflag(struct au_pin
*pin
,
583 au_fset_pin(pin
->flags
, DI_LOCKED
);
585 au_fclr_pin(pin
->flags
, DI_LOCKED
);
590 static inline void au_pin_set_parent(struct au_pin
*pin
, struct dentry
*parent
)
594 pin
->parent
= dget(parent
);
599 /* ---------------------------------------------------------------------- */
602 #ifdef CONFIG_AUFS_HNOTIFY
603 struct au_hnotify_op
{
604 void (*ctl
)(struct au_hinode
*hinode
, int do_set
);
605 int (*alloc
)(struct au_hinode
*hinode
);
608 * if it returns true, the the caller should free hinode->hi_notify,
609 * otherwise ->free() frees it.
611 int (*free
)(struct au_hinode
*hinode
,
612 struct au_hnotify
*hn
) __must_check
;
617 int (*reset_br
)(unsigned int udba
, struct au_branch
*br
, int perm
);
618 void (*fin_br
)(struct au_branch
*br
);
619 int (*init_br
)(struct au_branch
*br
, int perm
);
623 int au_hn_alloc(struct au_hinode
*hinode
, struct inode
*inode
);
624 void au_hn_free(struct au_hinode
*hinode
);
625 void au_hn_ctl(struct au_hinode
*hinode
, int do_set
);
626 void au_hn_reset(struct inode
*inode
, unsigned int flags
);
627 int au_hnotify(struct inode
*h_dir
, struct au_hnotify
*hnotify
, u32 mask
,
628 struct qstr
*h_child_qstr
, struct inode
*h_child_inode
);
629 int au_hnotify_reset_br(unsigned int udba
, struct au_branch
*br
, int perm
);
630 int au_hnotify_init_br(struct au_branch
*br
, int perm
);
631 void au_hnotify_fin_br(struct au_branch
*br
);
632 int __init
au_hnotify_init(void);
633 void au_hnotify_fin(void);
636 extern const struct au_hnotify_op au_hnotify_op
;
639 void au_hn_init(struct au_hinode
*hinode
)
641 hinode
->hi_notify
= NULL
;
644 static inline struct au_hnotify
*au_hn(struct au_hinode
*hinode
)
646 return hinode
->hi_notify
;
650 AuStub(int, au_hn_alloc
, return -EOPNOTSUPP
,
651 struct au_hinode
*hinode __maybe_unused
,
652 struct inode
*inode __maybe_unused
)
653 AuStub(struct au_hnotify
*, au_hn
, return NULL
, struct au_hinode
*hinode
)
654 AuStubVoid(au_hn_free
, struct au_hinode
*hinode __maybe_unused
)
655 AuStubVoid(au_hn_ctl
, struct au_hinode
*hinode __maybe_unused
,
656 int do_set __maybe_unused
)
657 AuStubVoid(au_hn_reset
, struct inode
*inode __maybe_unused
,
658 unsigned int flags __maybe_unused
)
659 AuStubInt0(au_hnotify_reset_br
, unsigned int udba __maybe_unused
,
660 struct au_branch
*br __maybe_unused
,
661 int perm __maybe_unused
)
662 AuStubInt0(au_hnotify_init_br
, struct au_branch
*br __maybe_unused
,
663 int perm __maybe_unused
)
664 AuStubVoid(au_hnotify_fin_br
, struct au_branch
*br __maybe_unused
)
665 AuStubInt0(__init au_hnotify_init
, void)
666 AuStubVoid(au_hnotify_fin
, void)
667 AuStubVoid(au_hn_init
, struct au_hinode
*hinode __maybe_unused
)
668 #endif /* CONFIG_AUFS_HNOTIFY */
670 static inline void au_hn_suspend(struct au_hinode
*hdir
)
672 au_hn_ctl(hdir
, /*do_set*/0);
675 static inline void au_hn_resume(struct au_hinode
*hdir
)
677 au_hn_ctl(hdir
, /*do_set*/1);
680 static inline void au_hn_inode_lock(struct au_hinode
*hdir
)
682 inode_lock(hdir
->hi_inode
);
686 static inline void au_hn_inode_lock_nested(struct au_hinode
*hdir
,
687 unsigned int sc __maybe_unused
)
689 inode_lock_nested(hdir
->hi_inode
, sc
);
693 static inline void au_hn_inode_unlock(struct au_hinode
*hdir
)
696 inode_unlock(hdir
->hi_inode
);
699 #endif /* __KERNEL__ */
700 #endif /* __AUFS_INODE_H__ */