提交 6c77b0ea 编写于 作者: C Christoph Hellwig 提交者: Alex Elder

xfs: remove xfs_cred.h

We're not actually passing around credentials inside XFS for a while
now, so remove all xfs_cred.h with it's cred_t typedef and all
instances of it.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NAlex Elder <aelder@sgi.com>
上级 78a4b096
/*
* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __XFS_CRED_H__
#define __XFS_CRED_H__
#include <linux/capability.h>
/*
* Credentials
*/
typedef const struct cred cred_t;
#endif /* __XFS_CRED_H__ */
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "xfs.h" #include "xfs.h"
#include "xfs_cred.h"
#include "xfs_sysctl.h" #include "xfs_sysctl.h"
/* /*
......
...@@ -189,7 +189,7 @@ xfs_vn_mknod( ...@@ -189,7 +189,7 @@ xfs_vn_mknod(
} }
xfs_dentry_to_name(&name, dentry); xfs_dentry_to_name(&name, dentry);
error = xfs_create(XFS_I(dir), &name, mode, rdev, &ip, NULL); error = xfs_create(XFS_I(dir), &name, mode, rdev, &ip);
if (unlikely(error)) if (unlikely(error))
goto out_free_acl; goto out_free_acl;
...@@ -362,7 +362,7 @@ xfs_vn_symlink( ...@@ -362,7 +362,7 @@ xfs_vn_symlink(
(irix_symlink_mode ? 0777 & ~current_umask() : S_IRWXUGO); (irix_symlink_mode ? 0777 & ~current_umask() : S_IRWXUGO);
xfs_dentry_to_name(&name, dentry); xfs_dentry_to_name(&name, dentry);
error = xfs_symlink(XFS_I(dir), &name, symname, mode, &cip, NULL); error = xfs_symlink(XFS_I(dir), &name, symname, mode, &cip);
if (unlikely(error)) if (unlikely(error))
goto out; goto out;
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#include <linux/random.h> #include <linux/random.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/writeback.h> #include <linux/writeback.h>
#include <linux/capability.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/div64.h> #include <asm/div64.h>
...@@ -79,7 +80,6 @@ ...@@ -79,7 +80,6 @@
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <xfs_cred.h>
#include <xfs_vnode.h> #include <xfs_vnode.h>
#include <xfs_stats.h> #include <xfs_stats.h>
#include <xfs_sysctl.h> #include <xfs_sysctl.h>
......
...@@ -55,8 +55,6 @@ uint ndquot; ...@@ -55,8 +55,6 @@ uint ndquot;
kmem_zone_t *qm_dqzone; kmem_zone_t *qm_dqzone;
kmem_zone_t *qm_dqtrxzone; kmem_zone_t *qm_dqtrxzone;
static cred_t xfs_zerocr;
STATIC void xfs_qm_list_init(xfs_dqlist_t *, char *, int); STATIC void xfs_qm_list_init(xfs_dqlist_t *, char *, int);
STATIC void xfs_qm_list_destroy(xfs_dqlist_t *); STATIC void xfs_qm_list_destroy(xfs_dqlist_t *);
...@@ -1224,8 +1222,8 @@ xfs_qm_qino_alloc( ...@@ -1224,8 +1222,8 @@ xfs_qm_qino_alloc(
return error; return error;
} }
if ((error = xfs_dir_ialloc(&tp, NULL, S_IFREG, 1, 0, error = xfs_dir_ialloc(&tp, NULL, S_IFREG, 1, 0, 0, 1, ip, &committed);
&xfs_zerocr, 0, 1, ip, &committed))) { if (error) {
xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES |
XFS_TRANS_ABORT); XFS_TRANS_ABORT);
return error; return error;
...@@ -2143,7 +2141,7 @@ xfs_qm_write_sb_changes( ...@@ -2143,7 +2141,7 @@ xfs_qm_write_sb_changes(
/* /*
* Given an inode, a uid and gid (from cred_t) make sure that we have * Given an inode, a uid, gid and prid make sure that we have
* allocated relevant dquot(s) on disk, and that we won't exceed inode * allocated relevant dquot(s) on disk, and that we won't exceed inode
* quotas by creating this file. * quotas by creating this file.
* This also attaches dquot(s) to the given inode after locking it, * This also attaches dquot(s) to the given inode after locking it,
......
...@@ -982,7 +982,6 @@ xfs_ialloc( ...@@ -982,7 +982,6 @@ xfs_ialloc(
mode_t mode, mode_t mode,
xfs_nlink_t nlink, xfs_nlink_t nlink,
xfs_dev_t rdev, xfs_dev_t rdev,
cred_t *cr,
xfs_prid_t prid, xfs_prid_t prid,
int okalloc, int okalloc,
xfs_buf_t **ialloc_context, xfs_buf_t **ialloc_context,
......
...@@ -212,7 +212,6 @@ typedef struct xfs_icdinode { ...@@ -212,7 +212,6 @@ typedef struct xfs_icdinode {
#ifdef __KERNEL__ #ifdef __KERNEL__
struct bhv_desc; struct bhv_desc;
struct cred;
struct xfs_buf; struct xfs_buf;
struct xfs_bmap_free; struct xfs_bmap_free;
struct xfs_bmbt_irec; struct xfs_bmbt_irec;
...@@ -456,8 +455,8 @@ void xfs_inode_free(struct xfs_inode *ip); ...@@ -456,8 +455,8 @@ void xfs_inode_free(struct xfs_inode *ip);
* xfs_inode.c prototypes. * xfs_inode.c prototypes.
*/ */
int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t, int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t,
xfs_nlink_t, xfs_dev_t, cred_t *, xfs_prid_t, xfs_nlink_t, xfs_dev_t, xfs_prid_t, int,
int, struct xfs_buf **, boolean_t *, xfs_inode_t **); struct xfs_buf **, boolean_t *, xfs_inode_t **);
uint xfs_ip2xflags(struct xfs_inode *); uint xfs_ip2xflags(struct xfs_inode *);
uint xfs_dic2xflags(struct xfs_dinode *); uint xfs_dic2xflags(struct xfs_dinode *);
......
...@@ -53,7 +53,6 @@ typedef struct xfs_trans_reservations { ...@@ -53,7 +53,6 @@ typedef struct xfs_trans_reservations {
#include "xfs_sync.h" #include "xfs_sync.h"
struct cred;
struct log; struct log;
struct xfs_mount_args; struct xfs_mount_args;
struct xfs_inode; struct xfs_inode;
......
...@@ -56,7 +56,6 @@ xfs_dir_ialloc( ...@@ -56,7 +56,6 @@ xfs_dir_ialloc(
mode_t mode, mode_t mode,
xfs_nlink_t nlink, xfs_nlink_t nlink,
xfs_dev_t rdev, xfs_dev_t rdev,
cred_t *credp,
prid_t prid, /* project id */ prid_t prid, /* project id */
int okalloc, /* ok to allocate new space */ int okalloc, /* ok to allocate new space */
xfs_inode_t **ipp, /* pointer to inode; it will be xfs_inode_t **ipp, /* pointer to inode; it will be
...@@ -93,7 +92,7 @@ xfs_dir_ialloc( ...@@ -93,7 +92,7 @@ xfs_dir_ialloc(
* transaction commit so that no other process can steal * transaction commit so that no other process can steal
* the inode(s) that we've just allocated. * the inode(s) that we've just allocated.
*/ */
code = xfs_ialloc(tp, dp, mode, nlink, rdev, credp, prid, okalloc, code = xfs_ialloc(tp, dp, mode, nlink, rdev, prid, okalloc,
&ialloc_context, &call_again, &ip); &ialloc_context, &call_again, &ip);
/* /*
...@@ -197,7 +196,7 @@ xfs_dir_ialloc( ...@@ -197,7 +196,7 @@ xfs_dir_ialloc(
* other allocations in this allocation group, * other allocations in this allocation group,
* this call should always succeed. * this call should always succeed.
*/ */
code = xfs_ialloc(tp, dp, mode, nlink, rdev, credp, prid, code = xfs_ialloc(tp, dp, mode, nlink, rdev, prid,
okalloc, &ialloc_context, &call_again, &ip); okalloc, &ialloc_context, &call_again, &ip);
/* /*
......
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
#define __XFS_UTILS_H__ #define __XFS_UTILS_H__
extern int xfs_dir_ialloc(xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t, extern int xfs_dir_ialloc(xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t,
xfs_dev_t, cred_t *, prid_t, int, xfs_dev_t, prid_t, int, xfs_inode_t **, int *);
xfs_inode_t **, int *);
extern int xfs_droplink(xfs_trans_t *, xfs_inode_t *); extern int xfs_droplink(xfs_trans_t *, xfs_inode_t *);
extern int xfs_bumplink(xfs_trans_t *, xfs_inode_t *); extern int xfs_bumplink(xfs_trans_t *, xfs_inode_t *);
extern void xfs_bump_ino_vers2(xfs_trans_t *, xfs_inode_t *); extern void xfs_bump_ino_vers2(xfs_trans_t *, xfs_inode_t *);
......
...@@ -1256,8 +1256,7 @@ xfs_create( ...@@ -1256,8 +1256,7 @@ xfs_create(
struct xfs_name *name, struct xfs_name *name,
mode_t mode, mode_t mode,
xfs_dev_t rdev, xfs_dev_t rdev,
xfs_inode_t **ipp, xfs_inode_t **ipp)
cred_t *credp)
{ {
int is_dir = S_ISDIR(mode); int is_dir = S_ISDIR(mode);
struct xfs_mount *mp = dp->i_mount; struct xfs_mount *mp = dp->i_mount;
...@@ -1363,7 +1362,7 @@ xfs_create( ...@@ -1363,7 +1362,7 @@ xfs_create(
* entry pointing to them, but a directory also the "." entry * entry pointing to them, but a directory also the "." entry
* pointing to itself. * pointing to itself.
*/ */
error = xfs_dir_ialloc(&tp, dp, mode, is_dir ? 2 : 1, rdev, credp, error = xfs_dir_ialloc(&tp, dp, mode, is_dir ? 2 : 1, rdev,
prid, resblks > 0, &ip, &committed); prid, resblks > 0, &ip, &committed);
if (error) { if (error) {
if (error == ENOSPC) if (error == ENOSPC)
...@@ -1936,8 +1935,7 @@ xfs_symlink( ...@@ -1936,8 +1935,7 @@ xfs_symlink(
struct xfs_name *link_name, struct xfs_name *link_name,
const char *target_path, const char *target_path,
mode_t mode, mode_t mode,
xfs_inode_t **ipp, xfs_inode_t **ipp)
cred_t *credp)
{ {
xfs_mount_t *mp = dp->i_mount; xfs_mount_t *mp = dp->i_mount;
xfs_trans_t *tp; xfs_trans_t *tp;
...@@ -2049,8 +2047,8 @@ xfs_symlink( ...@@ -2049,8 +2047,8 @@ xfs_symlink(
/* /*
* Allocate an inode for the symlink. * Allocate an inode for the symlink.
*/ */
error = xfs_dir_ialloc(&tp, dp, S_IFLNK | (mode & ~S_IFMT), error = xfs_dir_ialloc(&tp, dp, S_IFLNK | (mode & ~S_IFMT), 1, 0,
1, 0, credp, prid, resblks > 0, &ip, NULL); prid, resblks > 0, &ip, NULL);
if (error) { if (error) {
if (error == ENOSPC) if (error == ENOSPC)
goto error_return; goto error_return;
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#define _XFS_VNODEOPS_H 1 #define _XFS_VNODEOPS_H 1
struct attrlist_cursor_kern; struct attrlist_cursor_kern;
struct cred;
struct file; struct file;
struct iattr; struct iattr;
struct inode; struct inode;
...@@ -26,7 +25,7 @@ int xfs_inactive(struct xfs_inode *ip); ...@@ -26,7 +25,7 @@ int xfs_inactive(struct xfs_inode *ip);
int xfs_lookup(struct xfs_inode *dp, struct xfs_name *name, int xfs_lookup(struct xfs_inode *dp, struct xfs_name *name,
struct xfs_inode **ipp, struct xfs_name *ci_name); struct xfs_inode **ipp, struct xfs_name *ci_name);
int xfs_create(struct xfs_inode *dp, struct xfs_name *name, mode_t mode, int xfs_create(struct xfs_inode *dp, struct xfs_name *name, mode_t mode,
xfs_dev_t rdev, struct xfs_inode **ipp, cred_t *credp); xfs_dev_t rdev, struct xfs_inode **ipp);
int xfs_remove(struct xfs_inode *dp, struct xfs_name *name, int xfs_remove(struct xfs_inode *dp, struct xfs_name *name,
struct xfs_inode *ip); struct xfs_inode *ip);
int xfs_link(struct xfs_inode *tdp, struct xfs_inode *sip, int xfs_link(struct xfs_inode *tdp, struct xfs_inode *sip,
...@@ -34,8 +33,7 @@ int xfs_link(struct xfs_inode *tdp, struct xfs_inode *sip, ...@@ -34,8 +33,7 @@ int xfs_link(struct xfs_inode *tdp, struct xfs_inode *sip,
int xfs_readdir(struct xfs_inode *dp, void *dirent, size_t bufsize, int xfs_readdir(struct xfs_inode *dp, void *dirent, size_t bufsize,
xfs_off_t *offset, filldir_t filldir); xfs_off_t *offset, filldir_t filldir);
int xfs_symlink(struct xfs_inode *dp, struct xfs_name *link_name, int xfs_symlink(struct xfs_inode *dp, struct xfs_name *link_name,
const char *target_path, mode_t mode, struct xfs_inode **ipp, const char *target_path, mode_t mode, struct xfs_inode **ipp);
cred_t *credp);
int xfs_set_dmattrs(struct xfs_inode *ip, u_int evmask, u_int16_t state); int xfs_set_dmattrs(struct xfs_inode *ip, u_int evmask, u_int16_t state);
int xfs_change_file_space(struct xfs_inode *ip, int cmd, int xfs_change_file_space(struct xfs_inode *ip, int cmd,
xfs_flock64_t *bf, xfs_off_t offset, int attr_flags); xfs_flock64_t *bf, xfs_off_t offset, int attr_flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册