mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Eliminate Linux specific inode usage from common code
Change many of the znops routines to take a znode rather than an inode so that zfs_replay code can be largely shared and in the future the much of the znops code may be shared. Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9708
This commit is contained in:
committed by
Brian Behlendorf
parent
f0bf435176
commit
657ce25357
@@ -24,8 +24,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/zfs_vnops.h>
|
||||
#include <sys/zfs_znode.h>
|
||||
#include <sys/zfs_vnops.h>
|
||||
#include <sys/zfs_ctldir.h>
|
||||
#include <sys/zpl.h>
|
||||
|
||||
@@ -110,12 +110,12 @@ zpl_get_parent(struct dentry *child)
|
||||
{
|
||||
cred_t *cr = CRED();
|
||||
fstrans_cookie_t cookie;
|
||||
struct inode *ip;
|
||||
znode_t *zp;
|
||||
int error;
|
||||
|
||||
crhold(cr);
|
||||
cookie = spl_fstrans_mark();
|
||||
error = -zfs_lookup(child->d_inode, "..", &ip, 0, cr, NULL, NULL);
|
||||
error = -zfs_lookup(ITOZ(child->d_inode), "..", &zp, 0, cr, NULL, NULL);
|
||||
spl_fstrans_unmark(cookie);
|
||||
crfree(cr);
|
||||
ASSERT3S(error, <=, 0);
|
||||
@@ -123,7 +123,7 @@ zpl_get_parent(struct dentry *child)
|
||||
if (error)
|
||||
return (ERR_PTR(error));
|
||||
|
||||
return (d_obtain_alias(ip));
|
||||
return (d_obtain_alias(ZTOI(zp)));
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -138,7 +138,7 @@ zpl_commit_metadata(struct inode *inode)
|
||||
|
||||
crhold(cr);
|
||||
cookie = spl_fstrans_mark();
|
||||
error = -zfs_fsync(inode, 0, cr);
|
||||
error = -zfs_fsync(ITOZ(inode), 0, cr);
|
||||
spl_fstrans_unmark(cookie);
|
||||
crfree(cr);
|
||||
ASSERT3S(error, <=, 0);
|
||||
|
||||
Reference in New Issue
Block a user