summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs')
-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);