staging/lustre: Remove struct ll_iattr
This was a compat code from the time it had ia_attr_flags. Instead convert all the cryptic callers that did ((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags into direct access to op_data->op_attr_flags This also makes lustre/include/linux/obd.h not needed anymore, so remove it. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>hifive-unleashed-5.1
parent
1929c43385
commit
bb41292b4c
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
* GPL HEADER START
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 only,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will 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 version 2 for more details (a copy is included
|
||||
* in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 along with this program; If not, see
|
||||
* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*
|
||||
* GPL HEADER END
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*
|
||||
* Copyright (c) 2011, 2012, Intel Corporation.
|
||||
*/
|
||||
/*
|
||||
* This file is part of Lustre, http://www.lustre.org/
|
||||
* Lustre is a trademark of Sun Microsystems, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_OBD_H
|
||||
#define __LINUX_OBD_H
|
||||
|
||||
#ifndef __OBD_H
|
||||
#error Do not #include this file directly. #include <obd.h> instead
|
||||
#endif
|
||||
|
||||
#include "../obd_support.h"
|
||||
|
||||
#include <linux/fs.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/sched.h> /* for struct task_struct, for current.h */
|
||||
#include <linux/mount.h>
|
||||
|
||||
#include "../lustre_intent.h"
|
||||
|
||||
struct ll_iattr {
|
||||
struct iattr iattr;
|
||||
unsigned int ia_attr_flags;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_OBD_H */
|
|
@ -38,7 +38,6 @@
|
|||
#define __OBD_H
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include "linux/obd.h"
|
||||
|
||||
#define IOC_OSC_TYPE 'h'
|
||||
#define IOC_OSC_MIN_NR 20
|
||||
|
@ -55,6 +54,7 @@
|
|||
#include "lustre_export.h"
|
||||
#include "lustre_fid.h"
|
||||
#include "lustre_fld.h"
|
||||
#include "lustre_intent.h"
|
||||
|
||||
#define MAX_OBD_DEVICES 8192
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "../include/lustre_lite.h"
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/file.h>
|
||||
#include <linux/mount.h>
|
||||
#include "llite_internal.h"
|
||||
#include "../include/lustre/ll_fiemap.h"
|
||||
|
||||
|
@ -87,8 +88,7 @@ void ll_pack_inode2opdata(struct inode *inode, struct md_op_data *op_data,
|
|||
op_data->op_attr.ia_ctime = inode->i_ctime;
|
||||
op_data->op_attr.ia_size = i_size_read(inode);
|
||||
op_data->op_attr_blocks = inode->i_blocks;
|
||||
((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags =
|
||||
ll_inode_to_ext_flags(inode->i_flags);
|
||||
op_data->op_attr_flags = ll_inode_to_ext_flags(inode->i_flags);
|
||||
op_data->op_ioepoch = ll_i2info(inode)->lli_ioepoch;
|
||||
if (fh)
|
||||
op_data->op_handle = *fh;
|
||||
|
|
|
@ -1771,7 +1771,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,
|
|||
if (IS_ERR(op_data))
|
||||
return PTR_ERR(op_data);
|
||||
|
||||
((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags = flags;
|
||||
op_data->op_attr_flags = flags;
|
||||
op_data->op_attr.ia_valid |= ATTR_ATTR_FLAG;
|
||||
rc = md_setattr(sbi->ll_md_exp, op_data,
|
||||
NULL, 0, NULL, 0, &req, NULL);
|
||||
|
|
|
@ -279,8 +279,7 @@ static void mdc_setattr_pack_rec(struct mdt_rec_setattr *rec,
|
|||
rec->sa_atime = LTIME_S(op_data->op_attr.ia_atime);
|
||||
rec->sa_mtime = LTIME_S(op_data->op_attr.ia_mtime);
|
||||
rec->sa_ctime = LTIME_S(op_data->op_attr.ia_ctime);
|
||||
rec->sa_attr_flags =
|
||||
((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags;
|
||||
rec->sa_attr_flags = op_data->op_attr_flags;
|
||||
if ((op_data->op_attr.ia_valid & ATTR_GID) &&
|
||||
in_group_p(op_data->op_attr.ia_gid))
|
||||
rec->sa_suppgid =
|
||||
|
|
|
@ -185,8 +185,7 @@ void md_from_obdo(struct md_op_data *op_data, struct obdo *oa, u32 valid)
|
|||
op_data->op_attr.ia_valid |= ATTR_BLOCKS;
|
||||
}
|
||||
if (valid & OBD_MD_FLFLAGS) {
|
||||
((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags =
|
||||
oa->o_flags;
|
||||
op_data->op_attr_flags = oa->o_flags;
|
||||
op_data->op_attr.ia_valid |= ATTR_ATTR_FLAG;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue