/* * linux/fs/nfs/symlink.c * * Copyright (C) 1992 Rick Sladkey * * Optimization changes Copyright (C) 1994 Florian La Roche * * Jun 7 1999, cache symlink lookups in the page cache. -DaveM * * nfs symlink handling code */ #include #include #include #include #include #include #include #include #include #include /* Symlink caching in the page cache is even more simplistic * and straight-forward than readdir caching. */ static int nfs_symlink_filler(struct inode *inode, struct page *page) { int error; error = NFS_PROTO(inode)->readlink(inode, page, 0, PAGE_SIZE); if (error < 0) goto error; SetPageUptodate(page); unlock_page(page); return 0; error: SetPageError(page); unlock_page(page); return -EIO; } static const char *nfs_get_link(struct dentry *dentry, struct inode *inode, struct delayed_call *done) { struct page *page; void *err; if (!dentry) { err = ERR_PTR(nfs_revalidate_mapping_rcu(inode)); if (err) return err; page = find_get_page(inode->i_mapping, 0); if (!page) return ERR_PTR(-ECHILD); if (!PageUptodate(page)) { put_page(page); return ERR_PTR(-ECHILD); } } else { err = ERR_PTR(nfs_revalidate_mapping(inode, inode->i_mapping)); if (err) return err; page = read_cache_page(&inode->i_data, 0, (filler_t *)nfs_symlink_filler, inode); if (IS_ERR(page)) return ERR_CAST(page); } set_delayed_call(done, page_put_link, page); return page_address(page); } /* * symlinks can't do much... */ const struct inode_operations nfs_symlink_inode_operations = { .get_link = nfs_get_link, .getattr = nfs_getattr, .setattr = nfs_setattr, }; git.cgi/linux/net-next.git/tree/include/net/netns/conntrack.h?id=1bae6c99decf9137069646b593d3439171a8a8e2'>treecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-30 22:05:52 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-30 22:05:52 -0500
commit1bae6c99decf9137069646b593d3439171a8a8e2 (patch)
tree431604a568cd2303973470de326bd9731370a025 /include/net/netns/conntrack.h
parent63c190429020a9701b42887ac22c28f287f1762f (diff)
parent2b2d3eb41c920b47df2fcedd1489cf748bd09466 (diff)
Merge branch 'sh_eth-E-DMAC-interrupt-mask-cleanups'
Sergei Shtylyov says: ==================== sh_eth: E-DMAC interrupt mask cleanups Here's a set of 3 patches against DaveM's 'net-next.git' repo. The main goal of this set is to stop using the bare numbers for the E-DMAC interrupt masks. [1/3] sh_eth: rename EESIPR bits [2/3] sh_eth: add missing EESIPR bits [3/3] sh_eth: stop using bare numbers for EESIPR values ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netns/conntrack.h')