Lines Matching refs:fp
277 static int ksmbd_vfs_stream_read(struct ksmbd_file *fp, char *buf, loff_t *pos, in ksmbd_vfs_stream_read() argument
286 v_len = ksmbd_vfs_getcasexattr(file_mnt_idmap(fp->filp), in ksmbd_vfs_stream_read()
287 fp->filp->f_path.dentry, in ksmbd_vfs_stream_read()
288 fp->stream.name, in ksmbd_vfs_stream_read()
289 fp->stream.size, in ksmbd_vfs_stream_read()
301 fp->stream.pos = v_len; in ksmbd_vfs_stream_read()
364 int ksmbd_vfs_read(struct ksmbd_work *work, struct ksmbd_file *fp, size_t count, in ksmbd_vfs_read() argument
367 struct file *filp = fp->filp; in ksmbd_vfs_read()
378 if (!(fp->daccess & (FILE_READ_DATA_LE | FILE_EXECUTE_LE))) { in ksmbd_vfs_read()
379 pr_err("no right to read(%pD)\n", fp->filp); in ksmbd_vfs_read()
384 if (ksmbd_stream_fd(fp)) in ksmbd_vfs_read()
385 return ksmbd_vfs_stream_read(fp, rbuf, pos, count); in ksmbd_vfs_read()
407 static int ksmbd_vfs_stream_write(struct ksmbd_file *fp, char *buf, loff_t *pos, in ksmbd_vfs_stream_write() argument
411 struct mnt_idmap *idmap = file_mnt_idmap(fp->filp); in ksmbd_vfs_stream_write()
431 fp->filp->f_path.dentry, in ksmbd_vfs_stream_write()
432 fp->stream.name, in ksmbd_vfs_stream_write()
433 fp->stream.size, in ksmbd_vfs_stream_write()
457 &fp->filp->f_path, in ksmbd_vfs_stream_write()
458 fp->stream.name, in ksmbd_vfs_stream_write()
466 fp->stream.pos = size; in ksmbd_vfs_stream_write()
485 int ksmbd_vfs_write(struct ksmbd_work *work, struct ksmbd_file *fp, in ksmbd_vfs_write() argument
494 if (!(fp->daccess & (FILE_WRITE_DATA_LE | FILE_APPEND_DATA_LE)) || in ksmbd_vfs_write()
495 S_ISDIR(file_inode(fp->filp)->i_mode)) { in ksmbd_vfs_write()
496 pr_err("no right to write(%pD)\n", fp->filp); in ksmbd_vfs_write()
502 filp = fp->filp; in ksmbd_vfs_write()
504 if (ksmbd_stream_fd(fp)) { in ksmbd_vfs_write()
505 err = ksmbd_vfs_stream_write(fp, buf, pos, count); in ksmbd_vfs_write()
521 fp->reserve_lease_break = true; in ksmbd_vfs_write()
524 smb_break_all_levII_oplock(work, fp, 1); in ksmbd_vfs_write()
539 fp->filp, err); in ksmbd_vfs_write()
573 struct ksmbd_file *fp; in ksmbd_vfs_fsync() local
576 fp = ksmbd_lookup_fd_slow(work, fid, p_id); in ksmbd_vfs_fsync()
577 if (!fp) { in ksmbd_vfs_fsync()
581 err = vfs_fsync(fp->filp, 0); in ksmbd_vfs_fsync()
584 ksmbd_fd_put(work, fp); in ksmbd_vfs_fsync()
815 struct ksmbd_file *fp, loff_t size) in ksmbd_vfs_truncate() argument
820 filp = fp->filp; in ksmbd_vfs_truncate()
823 smb_break_all_levII_oplock(work, fp, 1); in ksmbd_vfs_truncate()
985 int ksmbd_vfs_zero_data(struct ksmbd_work *work, struct ksmbd_file *fp, in ksmbd_vfs_zero_data() argument
988 smb_break_all_levII_oplock(work, fp, 1); in ksmbd_vfs_zero_data()
989 if (fp->f_ci->m_fattr & FILE_ATTRIBUTE_SPARSE_FILE_LE) in ksmbd_vfs_zero_data()
990 return vfs_fallocate(fp->filp, in ksmbd_vfs_zero_data()
994 return vfs_fallocate(fp->filp, in ksmbd_vfs_zero_data()
999 int ksmbd_vfs_fqar_lseek(struct ksmbd_file *fp, loff_t start, loff_t length, in ksmbd_vfs_fqar_lseek() argument
1003 struct file *f = fp->filp; in ksmbd_vfs_fqar_lseek()
1004 struct inode *inode = file_inode(fp->filp); in ksmbd_vfs_fqar_lseek()
1126 int ksmbd_vfs_empty_dir(struct ksmbd_file *fp) in ksmbd_vfs_empty_dir() argument
1136 err = iterate_dir(fp->filp, &readdir_data.ctx); in ksmbd_vfs_empty_dir()