mirror of https://gitee.com/openkylin/linux.git
NFS: Remove NFS_I(inode)->data_updates
We have no more users... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
a1643a92f6
commit
80eb209def
|
@ -85,7 +85,6 @@ void nfs_clear_inode(struct inode *inode)
|
|||
*/
|
||||
BUG_ON(nfs_have_writebacks(inode));
|
||||
BUG_ON(!list_empty(&NFS_I(inode)->open_files));
|
||||
BUG_ON(atomic_read(&NFS_I(inode)->data_updates) != 0);
|
||||
nfs_zap_acl_cache(inode);
|
||||
nfs_access_zap_cache(inode);
|
||||
}
|
||||
|
@ -756,16 +755,6 @@ int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* nfs_begin_data_update
|
||||
* @inode - pointer to inode
|
||||
* Declare that a set of operations will update file data on the server
|
||||
*/
|
||||
void nfs_begin_data_update(struct inode *inode)
|
||||
{
|
||||
atomic_inc(&NFS_I(inode)->data_updates);
|
||||
}
|
||||
|
||||
/**
|
||||
* nfs_end_data_update
|
||||
* @inode - pointer to inode
|
||||
|
@ -775,15 +764,12 @@ void nfs_begin_data_update(struct inode *inode)
|
|||
*/
|
||||
void nfs_end_data_update(struct inode *inode)
|
||||
{
|
||||
struct nfs_inode *nfsi = NFS_I(inode);
|
||||
|
||||
/* Directories: invalidate page cache */
|
||||
if (S_ISDIR(inode->i_mode)) {
|
||||
spin_lock(&inode->i_lock);
|
||||
nfsi->cache_validity |= NFS_INO_INVALID_DATA;
|
||||
NFS_I(inode)->cache_validity |= NFS_INO_INVALID_DATA;
|
||||
spin_unlock(&inode->i_lock);
|
||||
}
|
||||
atomic_dec(&nfsi->data_updates);
|
||||
}
|
||||
|
||||
static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr)
|
||||
|
@ -823,7 +809,6 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
|
|||
{
|
||||
struct nfs_inode *nfsi = NFS_I(inode);
|
||||
loff_t cur_size, new_isize;
|
||||
int data_unstable;
|
||||
|
||||
|
||||
/* Has the inode gone and changed behind our back? */
|
||||
|
@ -832,9 +817,6 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
/* Are we in the process of updating data on the server? */
|
||||
data_unstable = nfs_caches_unstable(inode);
|
||||
|
||||
/* Do atomic weak cache consistency updates */
|
||||
nfs_wcc_update_inode(inode, fattr);
|
||||
|
||||
|
@ -1162,7 +1144,6 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
|
|||
INIT_LIST_HEAD(&nfsi->access_cache_entry_lru);
|
||||
INIT_LIST_HEAD(&nfsi->access_cache_inode_lru);
|
||||
INIT_RADIX_TREE(&nfsi->nfs_page_tree, GFP_ATOMIC);
|
||||
atomic_set(&nfsi->data_updates, 0);
|
||||
nfsi->ncommit = 0;
|
||||
nfsi->npages = 0;
|
||||
nfs4_init_once(nfsi);
|
||||
|
|
|
@ -136,11 +136,6 @@ struct nfs_inode {
|
|||
* server.
|
||||
*/
|
||||
unsigned long cache_change_attribute;
|
||||
/*
|
||||
* Counter indicating the number of outstanding requests that
|
||||
* will cause a file data update.
|
||||
*/
|
||||
atomic_t data_updates;
|
||||
|
||||
struct rb_root access_cache;
|
||||
struct list_head access_cache_entry_lru;
|
||||
|
@ -224,9 +219,13 @@ static inline struct nfs_inode *NFS_I(struct inode *inode)
|
|||
|
||||
#define NFS_FILEID(inode) (NFS_I(inode)->fileid)
|
||||
|
||||
static inline int nfs_caches_unstable(struct inode *inode)
|
||||
/**
|
||||
* nfs_begin_data_update
|
||||
* @inode - pointer to inode
|
||||
* Declare that a set of operations will update file data on the server
|
||||
*/
|
||||
static inline void nfs_begin_data_update(struct inode *inode)
|
||||
{
|
||||
return atomic_read(&NFS_I(inode)->data_updates) != 0;
|
||||
}
|
||||
|
||||
static inline void nfs_mark_for_revalidate(struct inode *inode)
|
||||
|
@ -299,7 +298,6 @@ extern int nfs_setattr(struct dentry *, struct iattr *);
|
|||
extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
|
||||
extern void nfs_begin_attr_update(struct inode *);
|
||||
extern void nfs_end_attr_update(struct inode *);
|
||||
extern void nfs_begin_data_update(struct inode *);
|
||||
extern void nfs_end_data_update(struct inode *);
|
||||
extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
|
||||
extern void put_nfs_open_context(struct nfs_open_context *ctx);
|
||||
|
|
Loading…
Reference in New Issue