Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aufs: call mutex.owner only when DEBUG_MUTEXES or MUTEX_SPIN_ON_OWNER…
… is defined 'owner' member of 'struct mutex' is defined as below in 'include/linux/mutex.h': struct mutex { ... if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER) struct task_struct *owner; endif ... But function au_pin_hdir_set_owner() called owner as below: void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task) { if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) p->hdir->hi_inode->i_mutex.owner = task; endif } So if Kernel doesn't define 'DEBUG_MUTEXES' and 'MUTEX_SPIN_ON_OWNER', but defines SMP, compiler will report the below error: fs/aufs/i_op.c: In function 'au_pin_hdir_set_owner': fs/aufs/i_op.c:593:28: error: 'struct mutex' has no member named 'owner' p->hdir->hi_inode->i_mutex.owner = task; ^ Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
- Loading branch information