X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fllite%2Fllite_internal.h;h=93b1a518a853d2312913738540519045f50ec28c;hp=7b92e26891c11aed34c1c63c8b6c493b25067235;hb=f37e26964a34fc33ec6add792ebb3b6a51797813;hpb=8c19d5147dba92a79cbcb8eb74a7bf3eecd77133 diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 7b92e26..93b1a51 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -349,6 +349,35 @@ static inline void trunc_sem_up_write(struct ll_trunc_sem *sem) wake_up_var(&sem->ll_trunc_readers); } +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL +static inline void lli_clear_acl(struct ll_inode_info *lli) +{ + if (lli->lli_posix_acl) { + posix_acl_release(lli->lli_posix_acl); + lli->lli_posix_acl = NULL; + } +} + +static inline void lli_replace_acl(struct ll_inode_info *lli, + struct lustre_md *md) +{ + spin_lock(&lli->lli_lock); + if (lli->lli_posix_acl) + posix_acl_release(lli->lli_posix_acl); + lli->lli_posix_acl = md->posix_acl; + spin_unlock(&lli->lli_lock); +} +#else +static inline void lli_clear_acl(struct ll_inode_info *lli) +{ +} + +static inline void lli_replace_acl(struct ll_inode_info *lli, + struct lustre_md *md) +{ +} +#endif + static inline __u32 ll_layout_version_get(struct ll_inode_info *lli) { __u32 gen;