Lines Matching refs:fd
24 int fd; member
226 hi->fd = -1; in hostfs_alloc_inode()
237 if (HOSTFS_I(inode)->fd != -1) { in hostfs_evict_inode()
238 close_file(&HOSTFS_I(inode)->fd); in hostfs_evict_inode()
239 HOSTFS_I(inode)->fd = -1; in hostfs_evict_inode()
301 int r, w, fd; in hostfs_open() local
321 fd = open_file(name, r, w, append); in hostfs_open()
323 if (fd < 0) in hostfs_open()
324 return fd; in hostfs_open()
330 close_file(&fd); in hostfs_open()
336 close_file(&fd); in hostfs_open()
339 if (HOSTFS_I(ino)->fd == -1) { in hostfs_open()
340 HOSTFS_I(ino)->fd = fd; in hostfs_open()
342 err = replace_file(fd, HOSTFS_I(ino)->fd); in hostfs_open()
343 close_file(&fd); in hostfs_open()
373 ret = fsync_file(HOSTFS_I(inode)->fd, datasync); in hostfs_fsync()
413 err = write_file(HOSTFS_I(inode)->fd, &base, buffer, count); in hostfs_writepage()
440 bytes_read = read_file(FILE_HOSTFS_I(file)->fd, &start, buffer, in hostfs_readpage()
483 err = write_file(FILE_HOSTFS_I(file)->fd, &pos, buffer + from, copied); in hostfs_write_end()
562 int error, fd; in hostfs_create() local
575 fd = file_create(name, mode & 0777); in hostfs_create()
576 if (fd < 0) in hostfs_create()
577 error = fd; in hostfs_create()
585 HOSTFS_I(inode)->fd = fd; in hostfs_create()
792 int fd = HOSTFS_I(inode)->fd; in hostfs_setattr() local
842 err = set_attr(name, &attrs, fd); in hostfs_setattr()