diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2015-05-07 11:14:26 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-05-11 08:13:12 -0400 |
| commit | 5f2c4179e129bdc47870a81a65d0aff85aa18293 (patch) | |
| tree | 23418d022fad27038f37bececb15eef232567ab2 /fs/namei.c | |
| parent | bda0be7ad994812960e9f8f2d2757f72cb4a96cb (diff) | |
switch ->put_link() from dentry to inode
only one instance looks at that argument at all; that sole
exception wants inode rather than dentry.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
| -rw-r--r-- | fs/namei.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/namei.c b/fs/namei.c index 0fa7af23cff6..43034046a0e1 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
| @@ -749,7 +749,7 @@ static inline void put_link(struct nameidata *nd) | |||
| 749 | struct saved *last = nd->stack + --nd->depth; | 749 | struct saved *last = nd->stack + --nd->depth; |
| 750 | struct inode *inode = last->inode; | 750 | struct inode *inode = last->inode; |
| 751 | if (last->cookie && inode->i_op->put_link) | 751 | if (last->cookie && inode->i_op->put_link) |
| 752 | inode->i_op->put_link(last->link.dentry, last->cookie); | 752 | inode->i_op->put_link(inode, last->cookie); |
| 753 | path_put(&last->link); | 753 | path_put(&last->link); |
| 754 | } | 754 | } |
| 755 | 755 | ||
| @@ -4444,17 +4444,18 @@ EXPORT_SYMBOL(readlink_copy); | |||
| 4444 | int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen) | 4444 | int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen) |
| 4445 | { | 4445 | { |
| 4446 | void *cookie; | 4446 | void *cookie; |
| 4447 | const char *link = dentry->d_inode->i_link; | 4447 | struct inode *inode = d_inode(dentry); |
| 4448 | const char *link = inode->i_link; | ||
| 4448 | int res; | 4449 | int res; |
| 4449 | 4450 | ||
| 4450 | if (!link) { | 4451 | if (!link) { |
| 4451 | link = dentry->d_inode->i_op->follow_link(dentry, &cookie); | 4452 | link = inode->i_op->follow_link(dentry, &cookie); |
| 4452 | if (IS_ERR(link)) | 4453 | if (IS_ERR(link)) |
| 4453 | return PTR_ERR(link); | 4454 | return PTR_ERR(link); |
| 4454 | } | 4455 | } |
| 4455 | res = readlink_copy(buffer, buflen, link); | 4456 | res = readlink_copy(buffer, buflen, link); |
| 4456 | if (dentry->d_inode->i_op->put_link) | 4457 | if (inode->i_op->put_link) |
| 4457 | dentry->d_inode->i_op->put_link(dentry, cookie); | 4458 | inode->i_op->put_link(inode, cookie); |
| 4458 | return res; | 4459 | return res; |
| 4459 | } | 4460 | } |
| 4460 | EXPORT_SYMBOL(generic_readlink); | 4461 | EXPORT_SYMBOL(generic_readlink); |
| @@ -4496,7 +4497,7 @@ const char *page_follow_link_light(struct dentry *dentry, void **cookie) | |||
| 4496 | } | 4497 | } |
| 4497 | EXPORT_SYMBOL(page_follow_link_light); | 4498 | EXPORT_SYMBOL(page_follow_link_light); |
| 4498 | 4499 | ||
| 4499 | void page_put_link(struct dentry *dentry, void *cookie) | 4500 | void page_put_link(struct inode *unused, void *cookie) |
| 4500 | { | 4501 | { |
| 4501 | struct page *page = cookie; | 4502 | struct page *page = cookie; |
| 4502 | kunmap(page); | 4503 | kunmap(page); |
