diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-14 15:18:01 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-14 15:18:01 -0500 |
commit | f33b5d783b4f56be5ace6a1c98fb5f76b2d2d07d (patch) | |
tree | b027b5f3429d416b3da5b9195024007dab062a5e /fs/namei.c | |
parent | e935d5da8e5d12fabe5b632736c50eae0427e8c8 (diff) | |
parent | 67963132638e67ad3c5aa16765e6f3f2f3cdd85c (diff) |
Merge ../linux-2.6
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 557dcf395ca1..8dc2b038d5d9 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2613,13 +2613,15 @@ void page_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) | |||
2613 | } | 2613 | } |
2614 | } | 2614 | } |
2615 | 2615 | ||
2616 | int page_symlink(struct inode *inode, const char *symname, int len) | 2616 | int __page_symlink(struct inode *inode, const char *symname, int len, |
2617 | gfp_t gfp_mask) | ||
2617 | { | 2618 | { |
2618 | struct address_space *mapping = inode->i_mapping; | 2619 | struct address_space *mapping = inode->i_mapping; |
2619 | struct page *page = grab_cache_page(mapping, 0); | 2620 | struct page *page; |
2620 | int err = -ENOMEM; | 2621 | int err = -ENOMEM; |
2621 | char *kaddr; | 2622 | char *kaddr; |
2622 | 2623 | ||
2624 | page = find_or_create_page(mapping, 0, gfp_mask); | ||
2623 | if (!page) | 2625 | if (!page) |
2624 | goto fail; | 2626 | goto fail; |
2625 | err = mapping->a_ops->prepare_write(NULL, page, 0, len-1); | 2627 | err = mapping->a_ops->prepare_write(NULL, page, 0, len-1); |
@@ -2654,6 +2656,12 @@ fail: | |||
2654 | return err; | 2656 | return err; |
2655 | } | 2657 | } |
2656 | 2658 | ||
2659 | int page_symlink(struct inode *inode, const char *symname, int len) | ||
2660 | { | ||
2661 | return __page_symlink(inode, symname, len, | ||
2662 | mapping_gfp_mask(inode->i_mapping)); | ||
2663 | } | ||
2664 | |||
2657 | struct inode_operations page_symlink_inode_operations = { | 2665 | struct inode_operations page_symlink_inode_operations = { |
2658 | .readlink = generic_readlink, | 2666 | .readlink = generic_readlink, |
2659 | .follow_link = page_follow_link_light, | 2667 | .follow_link = page_follow_link_light, |
@@ -2672,6 +2680,7 @@ EXPORT_SYMBOL(lookup_one_len); | |||
2672 | EXPORT_SYMBOL(page_follow_link_light); | 2680 | EXPORT_SYMBOL(page_follow_link_light); |
2673 | EXPORT_SYMBOL(page_put_link); | 2681 | EXPORT_SYMBOL(page_put_link); |
2674 | EXPORT_SYMBOL(page_readlink); | 2682 | EXPORT_SYMBOL(page_readlink); |
2683 | EXPORT_SYMBOL(__page_symlink); | ||
2675 | EXPORT_SYMBOL(page_symlink); | 2684 | EXPORT_SYMBOL(page_symlink); |
2676 | EXPORT_SYMBOL(page_symlink_inode_operations); | 2685 | EXPORT_SYMBOL(page_symlink_inode_operations); |
2677 | EXPORT_SYMBOL(path_lookup); | 2686 | EXPORT_SYMBOL(path_lookup); |