aufs: fix up for the new stable kernel
[pandora-kernel.git] / fs / aufs / f_op_sp.c
index 48b8aa1..9eeedd6 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
@@ -177,12 +177,19 @@ static void au_init_fop_sp(struct file *file)
 static int au_cpup_sp(struct dentry *dentry)
 {
        int err;
-       aufs_bindex_t bcpup;
        struct au_pin pin;
        struct au_wr_dir_args wr_dir_args = {
                .force_btgt     = -1,
                .flags          = 0
        };
+       struct au_cp_generic cpg = {
+               .dentry = dentry,
+               .bdst   = -1,
+               .bsrc   = -1,
+               .len    = -1,
+               .pin    = &pin,
+               .flags  = AuCpup_DTIME
+       };
 
        AuDbg("%.*s\n", AuDLNPair(dentry));
 
@@ -191,15 +198,15 @@ static int au_cpup_sp(struct dentry *dentry)
        err = au_wr_dir(dentry, /*src_dentry*/NULL, &wr_dir_args);
        if (unlikely(err < 0))
                goto out;
-       bcpup = err;
+       cpg.bdst = err;
        err = 0;
-       if (bcpup == au_dbstart(dentry))
+       if (cpg.bdst == au_dbstart(dentry))
                goto out; /* success */
 
-       err = au_pin(&pin, dentry, bcpup, au_opt_udba(dentry->d_sb),
+       err = au_pin(&pin, dentry, cpg.bdst, au_opt_udba(dentry->d_sb),
                     AuPin_MNT_WRITE);
        if (!err) {
-               err = au_sio_cpup_simple(dentry, bcpup, -1, AuCpup_DTIME);
+               err = au_sio_cpup_simple(&cpg);
                au_unpin(&pin);
        }