Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140223
b: refs/heads/master
c: 1fcdf53
h: refs/heads/master
i:
  140221: e9254b9
  140219: 3f9c7b0
  140215: 126ea1e
  140207: a8c6d23
  140191: 1997a2b
  140159: 8e05783
v: v3
  • Loading branch information
David Howells committed Apr 3, 2009
1 parent dac09fa commit 72b1deb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 545db45f0fc0d4203b045047798ce156972a3056
refs/heads/master: 1fcdf534885b65e6d39780a5a89e9dfc5431cf68
26 changes: 26 additions & 0 deletions trunk/fs/nfs/fscache-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,30 @@ static void nfs_fscache_inode_now_uncached(void *cookie_netfs_data)
}
}

/*
* Get an extra reference on a read context.
* - This function can be absent if the completion function doesn't require a
* context.
* - The read context is passed back to NFS in the event that a data read on the
* cache fails with EIO - in which case the server must be contacted to
* retrieve the data, which requires the read context for security.
*/
static void nfs_fh_get_context(void *cookie_netfs_data, void *context)
{
get_nfs_open_context(context);
}

/*
* Release an extra reference on a read context.
* - This function can be absent if the completion function doesn't require a
* context.
*/
static void nfs_fh_put_context(void *cookie_netfs_data, void *context)
{
if (context)
put_nfs_open_context(context);
}

/*
* Define the inode object for FS-Cache. This is used to describe an inode
* object to fscache_acquire_cookie(). It is keyed by the NFS file handle for
Expand All @@ -308,4 +332,6 @@ const struct fscache_cookie_def nfs_fscache_inode_object_def = {
.get_aux = nfs_fscache_inode_get_aux,
.check_aux = nfs_fscache_inode_check_aux,
.now_uncached = nfs_fscache_inode_now_uncached,
.get_context = nfs_fh_get_context,
.put_context = nfs_fh_put_context,
};

0 comments on commit 72b1deb

Please sign in to comment.