···182182 xfs_ilock(ip, lock_flags);183183184184 /* boolean: are we the file owner? */185185- file_owner = (current_fsuid(credp) == ip->i_d.di_uid);185185+ file_owner = (current_fsuid() == ip->i_d.di_uid);186186187187 /*188188 * Change various properties of a file.···15331533 * Make sure that we have allocated dquot(s) on disk.15341534 */15351535 error = XFS_QM_DQVOPALLOC(mp, dp,15361536- current_fsuid(credp), current_fsgid(credp), prid,15361536+ current_fsuid(), current_fsgid(), prid,15371537 XFS_QMOPT_QUOTALL|XFS_QMOPT_INHERIT, &udqp, &gdqp);15381538 if (error)15391539 goto std_return;···22692269 * Make sure that we have allocated dquot(s) on disk.22702270 */22712271 error = XFS_QM_DQVOPALLOC(mp, dp,22722272- current_fsuid(credp), current_fsgid(credp), prid,22722272+ current_fsuid(), current_fsgid(), prid,22732273 XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT, &udqp, &gdqp);22742274 if (error)22752275 goto std_return;···24952495 * Make sure that we have allocated dquot(s) on disk.24962496 */24972497 error = XFS_QM_DQVOPALLOC(mp, dp,24982498- current_fsuid(credp), current_fsgid(credp), prid,24982498+ current_fsuid(), current_fsgid(), prid,24992499 XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT, &udqp, &gdqp);25002500 if (error)25012501 goto std_return;
+50
include/linux/cred.h
···11+/* Credentials management22+ *33+ * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.44+ * Written by David Howells (dhowells@redhat.com)55+ *66+ * This program is free software; you can redistribute it and/or77+ * modify it under the terms of the GNU General Public Licence88+ * as published by the Free Software Foundation; either version99+ * 2 of the Licence, or (at your option) any later version.1010+ */1111+1212+#ifndef _LINUX_CRED_H1313+#define _LINUX_CRED_H1414+1515+#define get_current_user() (get_uid(current->user))1616+1717+#define task_uid(task) ((task)->uid)1818+#define task_gid(task) ((task)->gid)1919+#define task_euid(task) ((task)->euid)2020+#define task_egid(task) ((task)->egid)2121+2222+#define current_uid() (current->uid)2323+#define current_gid() (current->gid)2424+#define current_euid() (current->euid)2525+#define current_egid() (current->egid)2626+#define current_suid() (current->suid)2727+#define current_sgid() (current->sgid)2828+#define current_fsuid() (current->fsuid)2929+#define current_fsgid() (current->fsgid)3030+#define current_cap() (current->cap_effective)3131+3232+#define current_uid_gid(_uid, _gid) \3333+do { \3434+ *(_uid) = current->uid; \3535+ *(_gid) = current->gid; \3636+} while(0)3737+3838+#define current_euid_egid(_uid, _gid) \3939+do { \4040+ *(_uid) = current->euid; \4141+ *(_gid) = current->egid; \4242+} while(0)4343+4444+#define current_fsuid_fsgid(_uid, _gid) \4545+do { \4646+ *(_uid) = current->fsuid; \4747+ *(_gid) = current->fsgid; \4848+} while(0)4949+5050+#endif /* _LINUX_CRED_H */