/*
- * Copyright (C) 2005-2012 Junjiro R. Okajima
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
int au_finfo_init(struct file *file, struct au_fidir *fidir)
{
- int err, lc_idx;
+ int err;
struct au_finfo *finfo;
struct dentry *dentry;
err = 0;
au_nfiles_inc(dentry->d_sb);
- lc_idx = AuLcNonDir_FIINFO;
- if (fidir)
- lc_idx = AuLcDir_FIINFO;
- au_rw_class(&finfo->fi_rwsem, au_lc_key + lc_idx);
+ /* verbose coding for lock class name */
+ if (!fidir)
+ au_rw_class(&finfo->fi_rwsem, au_lc_key + AuLcNonDir_FIINFO);
+ else
+ au_rw_class(&finfo->fi_rwsem, au_lc_key + AuLcDir_FIINFO);
au_rw_write_lock(&finfo->fi_rwsem);
finfo->fi_btop = -1;
finfo->fi_hdir = fidir;