tag | line | file | source code |
dir | 91 | fs/ext/namei.c | static struct buffer_head * ext_find_entry(struct inode * dir, |
dir | 102 | fs/ext/namei.c | if (!dir) |
dir | 112 | fs/ext/namei.c | if (!(block = dir->i_data[0])) |
dir | 114 | fs/ext/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
dir | 123 | fs/ext/namei.c | while (offset < dir->i_size) { |
dir | 127 | fs/ext/namei.c | if (!(block = ext_bmap(dir,offset>>BLOCK_SIZE_BITS)) || |
dir | 128 | fs/ext/namei.c | !(bh = bread(dir->i_dev, block, BLOCK_SIZE))) { |
dir | 140 | fs/ext/namei.c | if (offset + de->rec_len < dir->i_size) |
dir | 157 | fs/ext/namei.c | int ext_lookup(struct inode * dir,const char * name, int len, |
dir | 165 | fs/ext/namei.c | if (!dir) |
dir | 167 | fs/ext/namei.c | if (!S_ISDIR(dir->i_mode)) { |
dir | 168 | fs/ext/namei.c | iput(dir); |
dir | 171 | fs/ext/namei.c | if (!(bh = ext_find_entry(dir,name,len,&de,NULL,NULL))) { |
dir | 172 | fs/ext/namei.c | iput(dir); |
dir | 177 | fs/ext/namei.c | if (!(*result = iget(dir->i_dev,ino))) { |
dir | 178 | fs/ext/namei.c | iput(dir); |
dir | 181 | fs/ext/namei.c | iput(dir); |
dir | 195 | fs/ext/namei.c | static struct buffer_head * ext_add_entry(struct inode * dir, |
dir | 205 | fs/ext/namei.c | if (!dir) |
dir | 216 | fs/ext/namei.c | if (!(block = dir->i_data[0])) |
dir | 218 | fs/ext/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
dir | 225 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data && offset < dir->i_size) { |
dir | 231 | fs/ext/namei.c | block = ext_create_block(dir,offset>>BLOCK_SIZE_BITS); |
dir | 234 | fs/ext/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) { |
dir | 241 | fs/ext/namei.c | if (offset >= dir->i_size) { |
dir | 254 | fs/ext/namei.c | dir->i_size += de->rec_len; |
dir | 255 | fs/ext/namei.c | dir->i_dirt = 1; |
dir | 256 | fs/ext/namei.c | dir->i_ctime = CURRENT_TIME; |
dir | 261 | fs/ext/namei.c | block = ext_create_block (dir,offset>>BLOCK_SIZE_BITS); |
dir | 267 | fs/ext/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
dir | 275 | fs/ext/namei.c | dir->i_size += de->rec_len; |
dir | 276 | fs/ext/namei.c | dir->i_dirt = 1; |
dir | 277 | fs/ext/namei.c | dir->i_ctime = CURRENT_TIME; |
dir | 292 | fs/ext/namei.c | dir->i_mtime = CURRENT_TIME; |
dir | 307 | fs/ext/namei.c | int ext_create(struct inode * dir,const char * name, int len, int mode, |
dir | 315 | fs/ext/namei.c | if (!dir) |
dir | 317 | fs/ext/namei.c | inode = ext_new_inode(dir->i_dev); |
dir | 319 | fs/ext/namei.c | iput(dir); |
dir | 325 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
dir | 330 | fs/ext/namei.c | iput(dir); |
dir | 336 | fs/ext/namei.c | iput(dir); |
dir | 341 | fs/ext/namei.c | int ext_mknod(struct inode * dir, const char * name, int len, int mode, int rdev) |
dir | 347 | fs/ext/namei.c | if (!dir) |
dir | 349 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
dir | 352 | fs/ext/namei.c | iput(dir); |
dir | 355 | fs/ext/namei.c | inode = ext_new_inode(dir->i_dev); |
dir | 357 | fs/ext/namei.c | iput(dir); |
dir | 384 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
dir | 389 | fs/ext/namei.c | iput(dir); |
dir | 395 | fs/ext/namei.c | iput(dir); |
dir | 400 | fs/ext/namei.c | int ext_mkdir(struct inode * dir, const char * name, int len, int mode) |
dir | 406 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
dir | 409 | fs/ext/namei.c | iput(dir); |
dir | 412 | fs/ext/namei.c | inode = ext_new_inode(dir->i_dev); |
dir | 414 | fs/ext/namei.c | iput(dir); |
dir | 425 | fs/ext/namei.c | iput(dir); |
dir | 433 | fs/ext/namei.c | iput(dir); |
dir | 446 | fs/ext/namei.c | de->inode = dir->i_ino; |
dir | 455 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
dir | 457 | fs/ext/namei.c | iput(dir); |
dir | 464 | fs/ext/namei.c | dir->i_nlink++; |
dir | 465 | fs/ext/namei.c | dir->i_dirt = 1; |
dir | 466 | fs/ext/namei.c | iput(dir); |
dir | 531 | fs/ext/namei.c | int ext_rmdir(struct inode * dir, const char * name, int len) |
dir | 539 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
dir | 544 | fs/ext/namei.c | if (!(inode = iget(dir->i_dev, de->inode))) |
dir | 546 | fs/ext/namei.c | if ((dir->i_mode & S_ISVTX) && current->euid && |
dir | 549 | fs/ext/namei.c | if (inode->i_dev != dir->i_dev) |
dir | 551 | fs/ext/namei.c | if (inode == dir) /* we may not delete ".", but "../dir" is ok */ |
dir | 573 | fs/ext/namei.c | dir->i_nlink--; |
dir | 574 | fs/ext/namei.c | dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
dir | 575 | fs/ext/namei.c | dir->i_dirt=1; |
dir | 578 | fs/ext/namei.c | iput(dir); |
dir | 584 | fs/ext/namei.c | int ext_unlink(struct inode * dir, const char * name, int len) |
dir | 593 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
dir | 596 | fs/ext/namei.c | if (!(inode = iget(dir->i_dev, de->inode))) |
dir | 599 | fs/ext/namei.c | if ((dir->i_mode & S_ISVTX) && !suser() && |
dir | 601 | fs/ext/namei.c | current->euid != dir->i_uid) |
dir | 621 | fs/ext/namei.c | iput(dir); |
dir | 625 | fs/ext/namei.c | int ext_symlink(struct inode * dir, const char * name, int len, const char * symname) |
dir | 633 | fs/ext/namei.c | if (!(inode = ext_new_inode(dir->i_dev))) { |
dir | 634 | fs/ext/namei.c | iput(dir); |
dir | 640 | fs/ext/namei.c | iput(dir); |
dir | 648 | fs/ext/namei.c | iput(dir); |
dir | 662 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
dir | 668 | fs/ext/namei.c | iput(dir); |
dir | 671 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
dir | 676 | fs/ext/namei.c | iput(dir); |
dir | 682 | fs/ext/namei.c | iput(dir); |
dir | 687 | fs/ext/namei.c | int ext_link(struct inode * oldinode, struct inode * dir, const char * name, int len) |
dir | 694 | fs/ext/namei.c | iput(dir); |
dir | 697 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
dir | 700 | fs/ext/namei.c | iput(dir); |
dir | 704 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
dir | 706 | fs/ext/namei.c | iput(dir); |
dir | 713 | fs/ext/namei.c | iput(dir); |
dir | 46 | fs/ext/symlink.c | static struct inode * ext_follow_link(struct inode * dir, struct inode * inode) |
dir | 51 | fs/ext/symlink.c | if (!dir) { |
dir | 52 | fs/ext/symlink.c | dir = current->root; |
dir | 53 | fs/ext/symlink.c | dir->i_count++; |
dir | 56 | fs/ext/symlink.c | iput(dir); |
dir | 60 | fs/ext/symlink.c | iput(dir); |
dir | 66 | fs/ext/symlink.c | iput(dir); |
dir | 73 | fs/ext/symlink.c | inode = _namei(bh->b_data,dir,1); |
dir | 60 | fs/minix/namei.c | static struct buffer_head * minix_find_entry(struct inode * dir, |
dir | 69 | fs/minix/namei.c | if (!dir) |
dir | 78 | fs/minix/namei.c | entries = dir->i_size / (sizeof (struct minix_dir_entry)); |
dir | 79 | fs/minix/namei.c | if (!(block = dir->i_data[0])) |
dir | 81 | fs/minix/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
dir | 89 | fs/minix/namei.c | if (!(block = minix_bmap(dir,i/MINIX_DIR_ENTRIES_PER_BLOCK)) || |
dir | 90 | fs/minix/namei.c | !(bh = bread(dir->i_dev, block, BLOCK_SIZE))) { |
dir | 107 | fs/minix/namei.c | int minix_lookup(struct inode * dir,const char * name, int len, |
dir | 115 | fs/minix/namei.c | if (!dir) |
dir | 117 | fs/minix/namei.c | if (!S_ISDIR(dir->i_mode)) { |
dir | 118 | fs/minix/namei.c | iput(dir); |
dir | 121 | fs/minix/namei.c | if (!(bh = minix_find_entry(dir,name,len,&de))) { |
dir | 122 | fs/minix/namei.c | iput(dir); |
dir | 127 | fs/minix/namei.c | if (!(*result = iget(dir->i_dev,ino))) { |
dir | 128 | fs/minix/namei.c | iput(dir); |
dir | 131 | fs/minix/namei.c | iput(dir); |
dir | 145 | fs/minix/namei.c | static struct buffer_head * minix_add_entry(struct inode * dir, |
dir | 153 | fs/minix/namei.c | if (!dir) |
dir | 164 | fs/minix/namei.c | if (!(block = dir->i_data[0])) |
dir | 166 | fs/minix/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
dir | 174 | fs/minix/namei.c | block = minix_create_block(dir,i/MINIX_DIR_ENTRIES_PER_BLOCK); |
dir | 177 | fs/minix/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) { |
dir | 183 | fs/minix/namei.c | if (i*sizeof(struct minix_dir_entry) >= dir->i_size) { |
dir | 185 | fs/minix/namei.c | dir->i_size = (i+1)*sizeof(struct minix_dir_entry); |
dir | 186 | fs/minix/namei.c | dir->i_dirt = 1; |
dir | 187 | fs/minix/namei.c | dir->i_ctime = CURRENT_TIME; |
dir | 190 | fs/minix/namei.c | dir->i_mtime = CURRENT_TIME; |
dir | 204 | fs/minix/namei.c | int minix_create(struct inode * dir,const char * name, int len, int mode, |
dir | 212 | fs/minix/namei.c | if (!dir) |
dir | 214 | fs/minix/namei.c | inode = minix_new_inode(dir->i_dev); |
dir | 216 | fs/minix/namei.c | iput(dir); |
dir | 222 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
dir | 227 | fs/minix/namei.c | iput(dir); |
dir | 233 | fs/minix/namei.c | iput(dir); |
dir | 238 | fs/minix/namei.c | int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev) |
dir | 244 | fs/minix/namei.c | if (!dir) |
dir | 246 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
dir | 249 | fs/minix/namei.c | iput(dir); |
dir | 252 | fs/minix/namei.c | inode = minix_new_inode(dir->i_dev); |
dir | 254 | fs/minix/namei.c | iput(dir); |
dir | 281 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
dir | 286 | fs/minix/namei.c | iput(dir); |
dir | 292 | fs/minix/namei.c | iput(dir); |
dir | 297 | fs/minix/namei.c | int minix_mkdir(struct inode * dir, const char * name, int len, int mode) |
dir | 303 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
dir | 306 | fs/minix/namei.c | iput(dir); |
dir | 309 | fs/minix/namei.c | inode = minix_new_inode(dir->i_dev); |
dir | 311 | fs/minix/namei.c | iput(dir); |
dir | 318 | fs/minix/namei.c | iput(dir); |
dir | 326 | fs/minix/namei.c | iput(dir); |
dir | 336 | fs/minix/namei.c | de->inode = dir->i_ino; |
dir | 343 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
dir | 345 | fs/minix/namei.c | iput(dir); |
dir | 352 | fs/minix/namei.c | dir->i_nlink++; |
dir | 353 | fs/minix/namei.c | dir->i_dirt = 1; |
dir | 354 | fs/minix/namei.c | iput(dir); |
dir | 407 | fs/minix/namei.c | int minix_rmdir(struct inode * dir, const char * name, int len) |
dir | 415 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
dir | 420 | fs/minix/namei.c | if (!(inode = iget(dir->i_dev, de->inode))) |
dir | 422 | fs/minix/namei.c | if ((dir->i_mode & S_ISVTX) && current->euid && |
dir | 425 | fs/minix/namei.c | if (inode->i_dev != dir->i_dev) |
dir | 427 | fs/minix/namei.c | if (inode == dir) /* we may not delete ".", but "../dir" is ok */ |
dir | 447 | fs/minix/namei.c | dir->i_nlink--; |
dir | 448 | fs/minix/namei.c | dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
dir | 449 | fs/minix/namei.c | dir->i_dirt=1; |
dir | 452 | fs/minix/namei.c | iput(dir); |
dir | 458 | fs/minix/namei.c | int minix_unlink(struct inode * dir, const char * name, int len) |
dir | 467 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
dir | 470 | fs/minix/namei.c | if (!(inode = iget(dir->i_dev, de->inode))) |
dir | 473 | fs/minix/namei.c | if ((dir->i_mode & S_ISVTX) && !suser() && |
dir | 475 | fs/minix/namei.c | current->euid != dir->i_uid) |
dir | 493 | fs/minix/namei.c | iput(dir); |
dir | 497 | fs/minix/namei.c | int minix_symlink(struct inode * dir, const char * name, int len, const char * symname) |
dir | 505 | fs/minix/namei.c | if (!(inode = minix_new_inode(dir->i_dev))) { |
dir | 506 | fs/minix/namei.c | iput(dir); |
dir | 512 | fs/minix/namei.c | iput(dir); |
dir | 520 | fs/minix/namei.c | iput(dir); |
dir | 534 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
dir | 540 | fs/minix/namei.c | iput(dir); |
dir | 543 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
dir | 548 | fs/minix/namei.c | iput(dir); |
dir | 554 | fs/minix/namei.c | iput(dir); |
dir | 559 | fs/minix/namei.c | int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len) |
dir | 566 | fs/minix/namei.c | iput(dir); |
dir | 569 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
dir | 572 | fs/minix/namei.c | iput(dir); |
dir | 576 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
dir | 578 | fs/minix/namei.c | iput(dir); |
dir | 585 | fs/minix/namei.c | iput(dir); |
dir | 40 | fs/minix/symlink.c | static struct inode * minix_follow_link(struct inode * dir, struct inode * inode) |
dir | 45 | fs/minix/symlink.c | if (!dir) { |
dir | 46 | fs/minix/symlink.c | dir = current->root; |
dir | 47 | fs/minix/symlink.c | dir->i_count++; |
dir | 50 | fs/minix/symlink.c | iput(dir); |
dir | 54 | fs/minix/symlink.c | iput(dir); |
dir | 60 | fs/minix/symlink.c | iput(dir); |
dir | 67 | fs/minix/symlink.c | inode = _namei(bh->b_data,dir,1); |
dir | 211 | fs/msdos/misc.c | int msdos_get_entry(struct inode *dir,int *pos,struct buffer_head **bh, |
dir | 219 | fs/msdos/misc.c | if ((sector = msdos_smap(dir,*pos >> SECTOR_BITS)) == -1) |
dir | 226 | fs/msdos/misc.c | if (!(*bh = msdos_sread(dir->i_dev,sector,&data))) |
dir | 239 | fs/msdos/misc.c | int msdos_scan(struct inode *dir,char *name,struct buffer_head **res_bh, |
dir | 248 | fs/msdos/misc.c | while ((*ino = msdos_get_entry(dir,&pos,res_bh,&de)) > -1) { |
dir | 256 | fs/msdos/misc.c | if (!(inode = iget(dir->i_dev,*ino))) break; |
dir | 340 | fs/msdos/misc.c | int msdos_parent_ino(struct inode *dir,int locked) |
dir | 344 | fs/msdos/misc.c | if (!S_ISDIR(dir->i_mode)) panic("Non-directory fed to m_p_i"); |
dir | 345 | fs/msdos/misc.c | if (dir->i_ino == MSDOS_ROOT_INO) return dir->i_ino; |
dir | 347 | fs/msdos/misc.c | if ((current = raw_scan(dir->i_sb,dir->i_data[D_START],MSDOS_DOTDOT,0, |
dir | 354 | fs/msdos/misc.c | if ((prev = raw_scan(dir->i_sb,current,MSDOS_DOTDOT,0,NULL)) < |
dir | 359 | fs/msdos/misc.c | if ((error = raw_scan(dir->i_sb,prev,NULL,current,&this)) < 0) { |
dir | 90 | fs/msdos/namei.c | static int msdos_find(struct inode *dir,const char *name,int len, |
dir | 96 | fs/msdos/namei.c | if ((res = msdos_format_name(MSDOS_SB(dir->i_sb)->name_check,name,len, |
dir | 98 | fs/msdos/namei.c | return msdos_scan(dir,msdos_name,bh,de,ino); |
dir | 102 | fs/msdos/namei.c | int msdos_lookup(struct inode *dir,const char *name,int len, |
dir | 111 | fs/msdos/namei.c | if (!dir) return -ENOENT; |
dir | 112 | fs/msdos/namei.c | if (!S_ISDIR(dir->i_mode)) { |
dir | 113 | fs/msdos/namei.c | iput(dir); |
dir | 117 | fs/msdos/namei.c | *result = dir; |
dir | 122 | fs/msdos/namei.c | ino = msdos_parent_ino(dir,0); |
dir | 123 | fs/msdos/namei.c | iput(dir); |
dir | 125 | fs/msdos/namei.c | if (!(*result = iget(dir->i_dev,ino))) return -EACCES; |
dir | 128 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) { |
dir | 129 | fs/msdos/namei.c | iput(dir); |
dir | 134 | fs/msdos/namei.c | if (!(*result = iget(dir->i_dev,ino))) { |
dir | 135 | fs/msdos/namei.c | iput(dir); |
dir | 140 | fs/msdos/namei.c | iput(dir); |
dir | 149 | fs/msdos/namei.c | iput(dir); |
dir | 156 | fs/msdos/namei.c | static int msdos_create_entry(struct inode *dir,char *name,int is_dir, |
dir | 163 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) { |
dir | 164 | fs/msdos/namei.c | if (dir->i_ino == MSDOS_ROOT_INO) return -ENOSPC; |
dir | 165 | fs/msdos/namei.c | if ((res = msdos_add_cluster(dir)) < 0) return res; |
dir | 166 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) return res; |
dir | 174 | fs/msdos/namei.c | if (*result = iget(dir->i_dev,ino)) msdos_read_inode(*result); |
dir | 184 | fs/msdos/namei.c | int msdos_create(struct inode *dir,const char *name,int len,int mode, |
dir | 192 | fs/msdos/namei.c | if (!dir) return -ENOENT; |
dir | 193 | fs/msdos/namei.c | if ((res = msdos_format_name(MSDOS_SB(dir->i_sb)->name_check,name,len, |
dir | 195 | fs/msdos/namei.c | iput(dir); |
dir | 199 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
dir | 202 | fs/msdos/namei.c | iput(dir); |
dir | 205 | fs/msdos/namei.c | res = msdos_create_entry(dir,msdos_name,S_ISDIR(mode),result); |
dir | 207 | fs/msdos/namei.c | iput(dir); |
dir | 212 | fs/msdos/namei.c | int msdos_mkdir(struct inode *dir,const char *name,int len,int mode) |
dir | 220 | fs/msdos/namei.c | if ((res = msdos_format_name(MSDOS_SB(dir->i_sb)->name_check,name,len, |
dir | 222 | fs/msdos/namei.c | iput(dir); |
dir | 226 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
dir | 229 | fs/msdos/namei.c | iput(dir); |
dir | 232 | fs/msdos/namei.c | if ((res = msdos_create_entry(dir,msdos_name,1,&inode)) < 0) { |
dir | 234 | fs/msdos/namei.c | iput(dir); |
dir | 248 | fs/msdos/namei.c | dot->i_size = dir->i_size; |
dir | 249 | fs/msdos/namei.c | dot->i_data[D_START] = dir->i_data[D_START]; |
dir | 254 | fs/msdos/namei.c | iput(dir); |
dir | 258 | fs/msdos/namei.c | if (msdos_rmdir(dir,name,len) < 0) panic("rmdir in mkdir failed"); |
dir | 264 | fs/msdos/namei.c | int msdos_rmdir(struct inode *dir,const char *name,int len) |
dir | 275 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) goto rmdir_done; |
dir | 277 | fs/msdos/namei.c | if (!(inode = iget(dir->i_dev,ino))) goto rmdir_done; |
dir | 281 | fs/msdos/namei.c | if (dir->i_dev != inode->i_dev || dir == inode) goto rmdir_done; |
dir | 295 | fs/msdos/namei.c | dir->i_mtime = CURRENT_TIME; |
dir | 296 | fs/msdos/namei.c | inode->i_dirt = dir->i_dirt = 1; |
dir | 302 | fs/msdos/namei.c | iput(dir); |
dir | 308 | fs/msdos/namei.c | int msdos_unlink(struct inode *dir,const char *name,int len) |
dir | 317 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) |
dir | 319 | fs/msdos/namei.c | if (!(inode = iget(dir->i_dev,ino))) { |
dir | 335 | fs/msdos/namei.c | iput(dir); |
dir | 61 | fs/namei.c | int lookup(struct inode * dir,const char * name, int len, |
dir | 68 | fs/namei.c | if (dir == current->root) |
dir | 70 | fs/namei.c | else if ((sb = dir->i_sb) && (dir == sb->s_mounted)) { |
dir | 71 | fs/namei.c | sb = dir->i_sb; |
dir | 72 | fs/namei.c | iput(dir); |
dir | 73 | fs/namei.c | if (dir = sb->s_covered) |
dir | 74 | fs/namei.c | dir->i_count++; |
dir | 77 | fs/namei.c | if (!dir) |
dir | 79 | fs/namei.c | if (!permission(dir,MAY_EXEC)) { |
dir | 80 | fs/namei.c | iput(dir); |
dir | 84 | fs/namei.c | *result = dir; |
dir | 87 | fs/namei.c | if (!dir->i_op || !dir->i_op->lookup) { |
dir | 88 | fs/namei.c | iput(dir); |
dir | 91 | fs/namei.c | return dir->i_op->lookup(dir,name,len,result); |
dir | 94 | fs/namei.c | struct inode * follow_link(struct inode * dir, struct inode * inode) |
dir | 96 | fs/namei.c | if (!dir || !inode) { |
dir | 97 | fs/namei.c | iput(dir); |
dir | 102 | fs/namei.c | iput(dir); |
dir | 105 | fs/namei.c | return inode->i_op->follow_link(dir,inode); |
dir | 201 | fs/namei.c | struct inode * dir, *inode; |
dir | 208 | fs/namei.c | if (!(dir = dir_namei(pathname,&namelen,&basename,NULL))) |
dir | 212 | fs/namei.c | *res_inode=dir; |
dir | 215 | fs/namei.c | iput(dir); |
dir | 218 | fs/namei.c | dir->i_count++; /* lookup eats the dir */ |
dir | 219 | fs/namei.c | error = lookup(dir,basename,namelen,&inode); |
dir | 222 | fs/namei.c | iput(dir); |
dir | 225 | fs/namei.c | if (!permission(dir,MAY_WRITE)) { |
dir | 226 | fs/namei.c | iput(dir); |
dir | 229 | fs/namei.c | if (!dir->i_op || !dir->i_op->create) { |
dir | 230 | fs/namei.c | iput(dir); |
dir | 233 | fs/namei.c | if (IS_RDONLY(dir)) { |
dir | 234 | fs/namei.c | iput(dir); |
dir | 237 | fs/namei.c | return dir->i_op->create(dir,basename,namelen,mode,res_inode); |
dir | 240 | fs/namei.c | iput(dir); |
dir | 244 | fs/namei.c | if (!(inode = follow_link(dir,inode))) |
dir | 293 | fs/namei.c | struct inode * dir; |
dir | 295 | fs/namei.c | if (!(dir = dir_namei(filename,&namelen,&basename, NULL))) |
dir | 298 | fs/namei.c | iput(dir); |
dir | 301 | fs/namei.c | if (IS_RDONLY(dir)) { |
dir | 302 | fs/namei.c | iput(dir); |
dir | 305 | fs/namei.c | if (!permission(dir,MAY_WRITE)) { |
dir | 306 | fs/namei.c | iput(dir); |
dir | 309 | fs/namei.c | if (!dir->i_op || !dir->i_op->mknod) { |
dir | 310 | fs/namei.c | iput(dir); |
dir | 313 | fs/namei.c | return dir->i_op->mknod(dir,basename,namelen,mode,dev); |
dir | 327 | fs/namei.c | struct inode * dir; |
dir | 329 | fs/namei.c | if (!(dir = dir_namei(pathname,&namelen,&basename, NULL))) |
dir | 332 | fs/namei.c | iput(dir); |
dir | 335 | fs/namei.c | if (IS_RDONLY(dir)) { |
dir | 336 | fs/namei.c | iput(dir); |
dir | 339 | fs/namei.c | if (!permission(dir,MAY_WRITE)) { |
dir | 340 | fs/namei.c | iput(dir); |
dir | 343 | fs/namei.c | if (!dir->i_op || !dir->i_op->mkdir) { |
dir | 344 | fs/namei.c | iput(dir); |
dir | 347 | fs/namei.c | return dir->i_op->mkdir(dir,basename,namelen,mode); |
dir | 354 | fs/namei.c | struct inode * dir; |
dir | 356 | fs/namei.c | if (!(dir = dir_namei(name,&namelen,&basename, NULL))) |
dir | 359 | fs/namei.c | iput(dir); |
dir | 362 | fs/namei.c | if (IS_RDONLY(dir)) { |
dir | 363 | fs/namei.c | iput(dir); |
dir | 366 | fs/namei.c | if (!permission(dir,MAY_WRITE)) { |
dir | 367 | fs/namei.c | iput(dir); |
dir | 370 | fs/namei.c | if (!dir->i_op || !dir->i_op->rmdir) { |
dir | 371 | fs/namei.c | iput(dir); |
dir | 374 | fs/namei.c | return dir->i_op->rmdir(dir,basename,namelen); |
dir | 381 | fs/namei.c | struct inode * dir; |
dir | 383 | fs/namei.c | if (!(dir = dir_namei(name,&namelen,&basename, NULL))) |
dir | 386 | fs/namei.c | iput(dir); |
dir | 389 | fs/namei.c | if (IS_RDONLY(dir)) { |
dir | 390 | fs/namei.c | iput(dir); |
dir | 393 | fs/namei.c | if (!permission(dir,MAY_WRITE)) { |
dir | 394 | fs/namei.c | iput(dir); |
dir | 397 | fs/namei.c | if (!dir->i_op || !dir->i_op->unlink) { |
dir | 398 | fs/namei.c | iput(dir); |
dir | 401 | fs/namei.c | return dir->i_op->unlink(dir,basename,namelen); |
dir | 406 | fs/namei.c | struct inode * dir; |
dir | 410 | fs/namei.c | dir = dir_namei(newname,&namelen,&basename, NULL); |
dir | 411 | fs/namei.c | if (!dir) |
dir | 414 | fs/namei.c | iput(dir); |
dir | 417 | fs/namei.c | if (IS_RDONLY(dir)) { |
dir | 418 | fs/namei.c | iput(dir); |
dir | 421 | fs/namei.c | if (!permission(dir,MAY_WRITE)) { |
dir | 422 | fs/namei.c | iput(dir); |
dir | 425 | fs/namei.c | if (!dir->i_op || !dir->i_op->symlink) { |
dir | 426 | fs/namei.c | iput(dir); |
dir | 429 | fs/namei.c | return dir->i_op->symlink(dir,basename,namelen,oldname); |
dir | 434 | fs/namei.c | struct inode * oldinode, * dir; |
dir | 441 | fs/namei.c | dir = dir_namei(newname,&namelen,&basename, NULL); |
dir | 442 | fs/namei.c | if (!dir) { |
dir | 448 | fs/namei.c | iput(dir); |
dir | 451 | fs/namei.c | if (IS_RDONLY(dir)) { |
dir | 453 | fs/namei.c | iput(dir); |
dir | 456 | fs/namei.c | if (dir->i_dev != oldinode->i_dev) { |
dir | 457 | fs/namei.c | iput(dir); |
dir | 461 | fs/namei.c | if (!permission(dir,MAY_WRITE)) { |
dir | 462 | fs/namei.c | iput(dir); |
dir | 466 | fs/namei.c | if (!dir->i_op || !dir->i_op->link) { |
dir | 467 | fs/namei.c | iput(dir); |
dir | 471 | fs/namei.c | return dir->i_op->link(oldinode, dir, basename, namelen); |
dir | 207 | fs/super.c | static int do_mount(int dev, const char * dir, char * type, int flags, void * data) |
dir | 212 | fs/super.c | if (!(dir_i = namei(dir))) |
dir | 82 | include/linux/ext_fs.h | extern int ext_lookup(struct inode * dir,const char * name, int len, |
dir | 84 | include/linux/ext_fs.h | extern int ext_create(struct inode * dir,const char * name, int len, int mode, |
dir | 86 | include/linux/ext_fs.h | extern int ext_mkdir(struct inode * dir, const char * name, int len, int mode); |
dir | 87 | include/linux/ext_fs.h | extern int ext_rmdir(struct inode * dir, const char * name, int len); |
dir | 88 | include/linux/ext_fs.h | extern int ext_unlink(struct inode * dir, const char * name, int len); |
dir | 91 | include/linux/ext_fs.h | extern int ext_link(struct inode * oldinode, struct inode * dir, const char * name, int len); |
dir | 92 | include/linux/ext_fs.h | extern int ext_mknod(struct inode * dir, const char * name, int len, int mode, int rdev); |
dir | 49 | include/linux/minix_fs.h | extern int minix_lookup(struct inode * dir,const char * name, int len, |
dir | 51 | include/linux/minix_fs.h | extern int minix_create(struct inode * dir,const char * name, int len, int mode, |
dir | 53 | include/linux/minix_fs.h | extern int minix_mkdir(struct inode * dir, const char * name, int len, int mode); |
dir | 54 | include/linux/minix_fs.h | extern int minix_rmdir(struct inode * dir, const char * name, int len); |
dir | 55 | include/linux/minix_fs.h | extern int minix_unlink(struct inode * dir, const char * name, int len); |
dir | 58 | include/linux/minix_fs.h | extern int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len); |
dir | 59 | include/linux/minix_fs.h | extern int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev); |
dir | 119 | include/linux/msdos_fs.h | extern int msdos_get_entry(struct inode *dir,int *pos,struct buffer_head **bh, |
dir | 121 | include/linux/msdos_fs.h | extern int msdos_scan(struct inode *dir,char *name,struct buffer_head **res_bh, |
dir | 123 | include/linux/msdos_fs.h | extern int msdos_parent_ino(struct inode *dir,int locked); |
dir | 139 | include/linux/msdos_fs.h | extern int msdos_lookup(struct inode *dir,const char *name,int len, |
dir | 141 | include/linux/msdos_fs.h | extern int msdos_create(struct inode *dir,const char *name,int len,int mode, |
dir | 143 | include/linux/msdos_fs.h | extern int msdos_mkdir(struct inode *dir,const char *name,int len,int mode); |
dir | 144 | include/linux/msdos_fs.h | extern int msdos_rmdir(struct inode *dir,const char *name,int len); |
dir | 145 | include/linux/msdos_fs.h | extern int msdos_unlink(struct inode *dir,const char *name,int len); |
dir | 72 | include/sys/kd.h | char dir; /* direction in vs out */ |
dir | 95 | mm/memory.c | unsigned long * dir, nr; |
dir | 102 | mm/memory.c | dir = (unsigned long *) ((from>>20) & 0xffc); /* _pg_dir = 0 */ |
dir | 103 | mm/memory.c | for ( ; size-->0 ; dir++) { |
dir | 104 | mm/memory.c | if (!(page_dir = *dir)) |
dir | 106 | mm/memory.c | *dir = 0; |
dir | 215 | mm/memory.c | unsigned long *page_table, *dir; |
dir | 223 | mm/memory.c | dir = (unsigned long *) ((from >> 20) & 0xffc); /* _pg_dir = 0 */ |
dir | 228 | mm/memory.c | for ( ; size > 0; ++dir, size -= pcnt, |
dir | 230 | mm/memory.c | if (!(page_dir = *dir)) { |
dir | 255 | mm/memory.c | *dir = 0; |
dir | 279 | mm/memory.c | unsigned long *page_table, *dir; |
dir | 285 | mm/memory.c | dir = (unsigned long *) ((from >> 20) & 0xffc); /* _pg_dir = 0 */ |
dir | 292 | mm/memory.c | if (!(1 & *dir)) { |
dir | 297 | mm/memory.c | *dir++ = ((unsigned long) page_table) | 7; |
dir | 300 | mm/memory.c | page_table = (unsigned long *)(0xfffff000 & *dir++); |