Lines Matching refs:filp
171 if (curlun->filp) { in fsg_lun_close()
173 fput(curlun->filp); in fsg_lun_close()
174 curlun->filp = NULL; in fsg_lun_close()
182 struct file *filp = NULL; in fsg_lun_open() local
194 filp = filp_open(filename, O_RDWR | O_LARGEFILE, 0); in fsg_lun_open()
195 if (PTR_ERR(filp) == -EROFS || PTR_ERR(filp) == -EACCES) in fsg_lun_open()
199 filp = filp_open(filename, O_RDONLY | O_LARGEFILE, 0); in fsg_lun_open()
200 if (IS_ERR(filp)) { in fsg_lun_open()
202 return PTR_ERR(filp); in fsg_lun_open()
205 if (!(filp->f_mode & FMODE_WRITE)) in fsg_lun_open()
208 inode = filp->f_mapping->host; in fsg_lun_open()
218 if (!(filp->f_mode & FMODE_CAN_READ)) { in fsg_lun_open()
222 if (!(filp->f_mode & FMODE_CAN_WRITE)) in fsg_lun_open()
266 curlun->filp = filp; in fsg_lun_open()
273 fput(filp); in fsg_lun_open()
287 struct file *filp = curlun->filp; in fsg_lun_fsync_sub() local
289 if (curlun->ro || !filp) in fsg_lun_fsync_sub()
291 return vfs_fsync(filp, 1); in fsg_lun_fsync_sub()
341 p = file_path(curlun->filp, buf, PAGE_SIZE - 1); in fsg_show_file()