diff options
author | David Disseldorp <ddiss@samba.org> | 2019-03-04 11:35:45 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-03-04 18:11:15 +0000 |
commit | 9fc1a09baee4e1339c0fe20e47e24b6ea6c293ae (patch) | |
tree | 432c6cdcb4908e7788af59235438ea2602aa620a /source3 | |
parent | 7798bc14fbdae3461eb30421923d53978b3f781d (diff) | |
download | samba-9fc1a09baee4e1339c0fe20e47e24b6ea6c293ae.tar.gz |
vfs: drop lseek stat-open checks
b9e91d2a8e41a43d7ebb7d7eed807a7d8de9b329 added fd==-1 checks to the
lseek() path to handle "stat opens". Current reply.c and
smb2_ioctl_filesys.c callers do not invoke SMB_VFS_LSEEK() with
stat-open fsp structs, so the fd==-1 checks can be removed from the
VFS.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_ceph.c | 5 | ||||
-rw-r--r-- | source3/modules/vfs_default.c | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 67b8d139891..38ffe08887e 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -575,10 +575,7 @@ static off_t cephwrap_lseek(struct vfs_handle_struct *handle, files_struct *fsp, off_t result = 0; DBG_DEBUG("[CEPH] cephwrap_lseek\n"); - /* Cope with 'stat' file opens. */ - if (fsp->fh->fd != -1) { - result = ceph_lseek(handle->data, fsp->fh->fd, offset, whence); - } + result = ceph_lseek(handle->data, fsp->fh->fd, offset, whence); WRAP_RETURN(result); } diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index cb5537e096e..1ed2c810667 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1025,10 +1025,7 @@ static off_t vfswrap_lseek(vfs_handle_struct *handle, files_struct *fsp, off_t o START_PROFILE(syscall_lseek); - /* Cope with 'stat' file opens. */ - if (fsp->fh->fd != -1) - result = lseek(fsp->fh->fd, offset, whence); - + result = lseek(fsp->fh->fd, offset, whence); /* * We want to maintain the fiction that we can seek * on a fifo for file system purposes. This allows |