git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix 'statement with no effect' warning
[zfs.git]
/
module
/
zfs
/
zfs_vnops.c
diff --git
a/module/zfs/zfs_vnops.c
b/module/zfs/zfs_vnops.c
index
30b3089
..
821ecec
100644
(file)
--- a/
module/zfs/zfs_vnops.c
+++ b/
module/zfs/zfs_vnops.c
@@
-2274,7
+2274,7
@@
top:
/*
* Remove setuid/setgid for non-privileged users
*/
/*
* Remove setuid/setgid for non-privileged users
*/
- secpolicy_setid_clear(attr, cr);
+
(void)
secpolicy_setid_clear(attr, cr);
trim_mask = (mask & (ATTR_UID|ATTR_GID));
} else {
need_policy = TRUE;
trim_mask = (mask & (ATTR_UID|ATTR_GID));
} else {
need_policy = TRUE;
@@
-2575,7
+2575,7
@@
out:
} else {
err2 = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
dmu_tx_commit(tx);
} else {
err2 = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
dmu_tx_commit(tx);
-
zfs_inode_update(zp);
+ zfs_inode_update(zp);
}
out2:
}
out2:
@@
-3169,7
+3169,6
@@
top:
zfs_dirent_unlock(dl);
*ipp = ZTOI(zp);
zfs_dirent_unlock(dl);
*ipp = ZTOI(zp);
- iput(ZTOI(zp));
if (zsb->z_os->os_sync == ZFS_SYNC_ALWAYS)
zil_commit(zilog, 0);
if (zsb->z_os->os_sync == ZFS_SYNC_ALWAYS)
zil_commit(zilog, 0);
@@
-3183,8
+3182,9
@@
EXPORT_SYMBOL(zfs_symlink);
* Return, in the buffer contained in the provided uio structure,
* the symbolic path referred to by ip.
*
* Return, in the buffer contained in the provided uio structure,
* the symbolic path referred to by ip.
*
- * IN: dentry - dentry of symbolic link.
- * nd - namedata for symlink
+ * IN: ip - inode of symbolic link
+ * uio - structure to contain the link path.
+ * cr - credentials of caller.
*
* RETURN: 0 if success
* error code if failure
*
* RETURN: 0 if success
* error code if failure
@@
-3194,47
+3194,29
@@
EXPORT_SYMBOL(zfs_symlink);
*/
/* ARGSUSED */
int
*/
/* ARGSUSED */
int
-zfs_
follow_link(struct dentry *dentry, struct nameidata *nd
)
+zfs_
readlink(struct inode *ip, uio_t *uio, cred_t *cr
)
{
{
- struct inode *ip = dentry->d_inode;
znode_t *zp = ITOZ(ip);
zfs_sb_t *zsb = ITOZSB(ip);
znode_t *zp = ITOZ(ip);
zfs_sb_t *zsb = ITOZSB(ip);
- struct iovec iov;
- uio_t uio;
int error;
ZFS_ENTER(zsb);
ZFS_VERIFY_ZP(zp);
int error;
ZFS_ENTER(zsb);
ZFS_VERIFY_ZP(zp);
- iov.iov_len = MAXPATHLEN + 1;
- iov.iov_base = kmem_zalloc(iov.iov_len, KM_SLEEP);
-
- uio.uio_iov = &iov;
- uio.uio_iovcnt = 1;
- uio.uio_resid = iov.iov_len;
- uio.uio_segflg = UIO_SYSSPACE;
-
mutex_enter(&zp->z_lock);
if (zp->z_is_sa)
mutex_enter(&zp->z_lock);
if (zp->z_is_sa)
- error = sa_lookup_uio(zp->z_sa_hdl, SA_ZPL_SYMLINK(zsb), &uio);
+ error = sa_lookup_uio(zp->z_sa_hdl,
+ SA_ZPL_SYMLINK(zsb), uio);
else
else
- error = zfs_sa_readlink(zp,
&
uio);
+ error = zfs_sa_readlink(zp, uio);
mutex_exit(&zp->z_lock);
ZFS_ACCESSTIME_STAMP(zsb, zp);
zfs_inode_update(zp);
mutex_exit(&zp->z_lock);
ZFS_ACCESSTIME_STAMP(zsb, zp);
zfs_inode_update(zp);
-
- if (error) {
- kmem_free(iov.iov_base, iov.iov_len);
- nd_set_link(nd, ERR_PTR(error));
- } else {
- nd_set_link(nd, iov.iov_base);
- }
-
ZFS_EXIT(zsb);
return (error);
}
ZFS_EXIT(zsb);
return (error);
}
-EXPORT_SYMBOL(zfs_
follow_
link);
+EXPORT_SYMBOL(zfs_
read
link);
/*
* Insert a new entry into directory tdip referencing sip.
/*
* Insert a new entry into directory tdip referencing sip.
@@
-3632,8
+3614,6
@@
zfs_inactive(struct inode *ip)
zfs_sb_t *zsb = ITOZSB(ip);
int error;
zfs_sb_t *zsb = ITOZSB(ip);
int error;
- truncate_inode_pages(&ip->i_data, 0);
-
#ifdef HAVE_SNAPSHOT
/* Early return for snapshot inode? */
#endif /* HAVE_SNAPSHOT */
#ifdef HAVE_SNAPSHOT
/* Early return for snapshot inode? */
#endif /* HAVE_SNAPSHOT */