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 | |
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')
-rw-r--r-- | fs/configfs/symlink.c | 2 | ||||
-rw-r--r-- | fs/f2fs/namei.c | 2 | ||||
-rw-r--r-- | fs/fuse/dir.c | 2 | ||||
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 2 | ||||
-rw-r--r-- | fs/hppfs/hppfs.c | 8 | ||||
-rw-r--r-- | fs/kernfs/symlink.c | 2 | ||||
-rw-r--r-- | fs/libfs.c | 2 | ||||
-rw-r--r-- | fs/namei.c | 13 | ||||
-rw-r--r-- | fs/overlayfs/inode.c | 4 | ||||
-rw-r--r-- | fs/proc/inode.c | 2 |
10 files changed, 20 insertions, 19 deletions
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c index 0ace75649009..bc464c26e00e 100644 --- a/fs/configfs/symlink.c +++ b/fs/configfs/symlink.c @@ -296,7 +296,7 @@ static const char *configfs_follow_link(struct dentry *dentry, void **cookie) return ERR_PTR(error); } -static void configfs_put_link(struct dentry *dentry, void *cookie) +static void configfs_put_link(struct inode *unused, void *cookie) { free_page((unsigned long)cookie); } diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index cd05a7c91533..71765d062914 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -301,7 +301,7 @@ static const char *f2fs_follow_link(struct dentry *dentry, void **cookie) const char *link = page_follow_link_light(dentry, cookie); if (!IS_ERR(link) && !*link) { /* this is broken symlink case */ - page_put_link(dentry, *cookie); + page_put_link(NULL, *cookie); link = ERR_PTR(-ENOENT); } return link; diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index d5cdef8b7f3a..9e704c124392 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1395,7 +1395,7 @@ static const char *fuse_follow_link(struct dentry *dentry, void **cookie) return link; } -static void fuse_put_link(struct dentry *dentry, void *cookie) +static void fuse_put_link(struct inode *unused, void *cookie) { free_page((unsigned long) cookie); } diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 7b6ed7a908f6..4a437ab5f296 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -915,7 +915,7 @@ static const char *hostfs_follow_link(struct dentry *dentry, void **cookie) return *cookie = link; } -static void hostfs_put_link(struct dentry *dentry, void *cookie) +static void hostfs_put_link(struct inode *unused, void *cookie) { __putname(cookie); } diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c index 15a774eb5bbf..2867837909a9 100644 --- a/fs/hppfs/hppfs.c +++ b/fs/hppfs/hppfs.c @@ -649,12 +649,12 @@ static const char *hppfs_follow_link(struct dentry *dentry, void **cookie) return d_inode(proc_dentry)->i_op->follow_link(proc_dentry, cookie); } -static void hppfs_put_link(struct dentry *dentry, void *cookie) +static void hppfs_put_link(struct inode *inode, void *cookie) { - struct dentry *proc_dentry = HPPFS_I(d_inode(dentry))->proc_dentry; + struct inode *proc_inode = d_inode(HPPFS_I(inode)->proc_dentry); - if (d_inode(proc_dentry)->i_op->put_link) - d_inode(proc_dentry)->i_op->put_link(proc_dentry, cookie); + if (proc_inode->i_op->put_link) + proc_inode->i_op->put_link(proc_inode, cookie); } static const struct inode_operations hppfs_dir_iops = { diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c index 366c5a17475e..f6aa2e5a76b4 100644 --- a/fs/kernfs/symlink.c +++ b/fs/kernfs/symlink.c @@ -126,7 +126,7 @@ static const char *kernfs_iop_follow_link(struct dentry *dentry, void **cookie) return *cookie = (char *)page; } -static void kernfs_iop_put_link(struct dentry *dentry, void *cookie) +static void kernfs_iop_put_link(struct inode *unused, void *cookie) { free_page((unsigned long)cookie); } diff --git a/fs/libfs.c b/fs/libfs.c index c5f3373e326b..01c337b0fec8 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -1024,7 +1024,7 @@ int noop_fsync(struct file *file, loff_t start, loff_t end, int datasync) } EXPORT_SYMBOL(noop_fsync); -void kfree_put_link(struct dentry *dentry, void *cookie) +void kfree_put_link(struct inode *unused, void *cookie) { kfree(cookie); } 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) struct saved *last = nd->stack + --nd->depth; struct inode *inode = last->inode; if (last->cookie && inode->i_op->put_link) - inode->i_op->put_link(last->link.dentry, last->cookie); + inode->i_op->put_link(inode, last->cookie); path_put(&last->link); } @@ -4444,17 +4444,18 @@ EXPORT_SYMBOL(readlink_copy); int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen) { void *cookie; - const char *link = dentry->d_inode->i_link; + struct inode *inode = d_inode(dentry); + const char *link = inode->i_link; int res; if (!link) { - link = dentry->d_inode->i_op->follow_link(dentry, &cookie); + link = inode->i_op->follow_link(dentry, &cookie); if (IS_ERR(link)) return PTR_ERR(link); } res = readlink_copy(buffer, buflen, link); - if (dentry->d_inode->i_op->put_link) - dentry->d_inode->i_op->put_link(dentry, cookie); + if (inode->i_op->put_link) + inode->i_op->put_link(inode, cookie); return res; } EXPORT_SYMBOL(generic_readlink); @@ -4496,7 +4497,7 @@ const char *page_follow_link_light(struct dentry *dentry, void **cookie) } EXPORT_SYMBOL(page_follow_link_light); -void page_put_link(struct dentry *dentry, void *cookie) +void page_put_link(struct inode *unused, void *cookie) { struct page *page = cookie; kunmap(page); diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 9986833c9fcc..308379b2d0b2 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -174,7 +174,7 @@ static const char *ovl_follow_link(struct dentry *dentry, void **cookie) return ret; } -static void ovl_put_link(struct dentry *dentry, void *c) +static void ovl_put_link(struct inode *unused, void *c) { struct inode *realinode; struct ovl_link_data *data = c; @@ -183,7 +183,7 @@ static void ovl_put_link(struct dentry *dentry, void *c) return; realinode = data->realdentry->d_inode; - realinode->i_op->put_link(data->realdentry, data->cookie); + realinode->i_op->put_link(realinode, data->cookie); kfree(data); } diff --git a/fs/proc/inode.c b/fs/proc/inode.c index eb35874fe09c..afe232b9df6e 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -402,7 +402,7 @@ static const char *proc_follow_link(struct dentry *dentry, void **cookie) return pde->data; } -static void proc_put_link(struct dentry *dentry, void *p) +static void proc_put_link(struct inode *unused, void *p) { unuse_pde(p); } |