Lines Matching refs:fd
24 int fd; member
229 hi->fd = -1; in hostfs_alloc_inode()
240 if (HOSTFS_I(inode)->fd != -1) { in hostfs_evict_inode()
241 close_file(&HOSTFS_I(inode)->fd); in hostfs_evict_inode()
242 HOSTFS_I(inode)->fd = -1; in hostfs_evict_inode()
310 int r, w, fd; in hostfs_open() local
330 fd = open_file(name, r, w, append); in hostfs_open()
332 if (fd < 0) in hostfs_open()
333 return fd; in hostfs_open()
339 close_file(&fd); in hostfs_open()
345 close_file(&fd); in hostfs_open()
348 if (HOSTFS_I(ino)->fd == -1) { in hostfs_open()
349 HOSTFS_I(ino)->fd = fd; in hostfs_open()
351 err = replace_file(fd, HOSTFS_I(ino)->fd); in hostfs_open()
352 close_file(&fd); in hostfs_open()
382 ret = fsync_file(HOSTFS_I(inode)->fd, datasync); in hostfs_fsync()
422 err = write_file(HOSTFS_I(inode)->fd, &base, buffer, count); in hostfs_writepage()
449 bytes_read = read_file(FILE_HOSTFS_I(file)->fd, &start, buffer, in hostfs_readpage()
492 err = write_file(FILE_HOSTFS_I(file)->fd, &pos, buffer + from, copied); in hostfs_write_end()
571 int error, fd; in hostfs_create() local
584 fd = file_create(name, mode & 0777); in hostfs_create()
585 if (fd < 0) in hostfs_create()
586 error = fd; in hostfs_create()
594 HOSTFS_I(inode)->fd = fd; in hostfs_create()
813 int fd = HOSTFS_I(inode)->fd; in hostfs_setattr() local
860 err = set_attr(name, &attrs, fd); in hostfs_setattr()