aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-04-16 16:22:45 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-05-14 15:09:21 -0400
commit2d36bfde8565b315e624302d12da5a7c9d195522 (patch)
tree5760ff58853027df0343c6bab0530025cd7a6fa1 /include/linux/nfs_fs.h
parentfc54a0c65fc8cae6b0355512f0b619c1515e7d7f (diff)
NFS: Add helper functions for allocating filehandles and fattr structs
NFS Filehandles and struct fattr are really too large to be allocated on the stack. This patch adds in a couple of helper functions to allocate them dynamically instead. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 07ce4609fe50..77c2ae53431c 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -356,6 +356,20 @@ extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struc
356extern u64 nfs_compat_user_ino64(u64 fileid); 356extern u64 nfs_compat_user_ino64(u64 fileid);
357extern void nfs_fattr_init(struct nfs_fattr *fattr); 357extern void nfs_fattr_init(struct nfs_fattr *fattr);
358 358
359extern struct nfs_fattr *nfs_alloc_fattr(void);
360
361static inline void nfs_free_fattr(const struct nfs_fattr *fattr)
362{
363 kfree(fattr);
364}
365
366extern struct nfs_fh *nfs_alloc_fhandle(void);
367
368static inline void nfs_free_fhandle(const struct nfs_fh *fh)
369{
370 kfree(fh);
371}
372
359/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ 373/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */
360extern __be32 root_nfs_parse_addr(char *name); /*__init*/ 374extern __be32 root_nfs_parse_addr(char *name); /*__init*/
361extern unsigned long nfs_inc_attr_generation_counter(void); 375extern unsigned long nfs_inc_attr_generation_counter(void);