summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-04-07 14:23:45 -0700
committerBrian Behlendorf <[email protected]>2011-04-07 14:27:09 -0700
commit0d3ac5e7356d29fbb7d2880c0a0c457656355ca0 (patch)
treed23e454839658f4ab00e4c36672c77d2b6df53ff
parent9b1d6001bcfc065e32942c0c3af9f56cc0c26eb7 (diff)
Linux 2.6.29 compat, credentials
The .sync_fs fix as applied did not use the updated SPL credential API. This broke builds on Debian Lenny, this change applies the needed fix to use the portable API. The original credential changes are part of commit 81e97e21872a9c38ad66c37fafe1436ee25abee3.
-rw-r--r--module/zfs/zpl_super.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/zpl_super.c b/module/zfs/zpl_super.c
index d3037f498..6e8265dac 100644
--- a/module/zfs/zpl_super.c
+++ b/module/zfs/zpl_super.c
@@ -107,12 +107,12 @@ zpl_put_super(struct super_block *sb)
static int
zpl_sync_fs(struct super_block *sb, int wait)
{
- cred_t *cr;
+ cred_t *cr = CRED();
int error;
- cr = (cred_t *)get_current_cred();
+ crhold(cr);
error = -zfs_sync(sb, wait, cr);
- put_cred(cr);
+ crfree(cr);
ASSERT3S(error, <=, 0);
return (error);