From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Layton Subject: [PATCH 05/13] cifs: add new cifs_fattr struct for holding cifs inode attributes in common way Date: Mon, 11 May 2009 16:24:24 -0400 Message-ID: <1242073472-7100-6-git-send-email-jlayton@redhat.com> References: <1242073472-7100-1-git-send-email-jlayton@redhat.com> Cc: linux-fsdevel@vger.kernel.org To: linux-cifs-client@lists.samba.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:55623 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755589AbZEKUYf (ORCPT ); Mon, 11 May 2009 16:24:35 -0400 In-Reply-To: <1242073472-7100-1-git-send-email-jlayton@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: In order to unify some codepaths, introduce a common cifs_fattr struct for storing inode attributes. The different codepaths (unix, legacy, normal, etc...) can fill out this struct with inode info. It can then be passed as an arg to a common set of routines to get and update inodes. Signed-off-by: Jeff Layton --- fs/cifs/cifsglob.h | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index a61ab77..6a0abc0 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -472,6 +472,29 @@ struct dfs_info3_param { char *node_name; }; + +/* + * common struct for holding inode info when searching for or updating an + * inode with new info + */ + +struct cifs_fattr { + u32 cf_flags; + u32 cf_cifsattrs; + u64 cf_uniqueid; + u64 cf_eof; + u64 cf_bytes; + uid_t cf_uid; + gid_t cf_gid; + umode_t cf_mode; + dev_t cf_rdev; + unsigned int cf_nlink; + unsigned int cf_dtype; + struct timespec cf_atime; + struct timespec cf_mtime; + struct timespec cf_ctime; +}; + static inline void free_dfs_info_param(struct dfs_info3_param *param) { if (param) { -- 1.6.0.6