update aufs to it's latest standalone 3.2 branch
[pandora-kernel.git] / fs / aufs / finfo.c
index 3208510..2111355 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -127,7 +127,7 @@ void au_fi_init_once(void *_finfo)
 
 int au_finfo_init(struct file *file, struct au_fidir *fidir)
 {
-       int err, lc_idx;
+       int err;
        struct au_finfo *finfo;
        struct dentry *dentry;
 
@@ -139,10 +139,11 @@ int au_finfo_init(struct file *file, struct au_fidir *fidir)
 
        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;