Lines Matching refs:dip

62 static int jfs_create(struct user_namespace *mnt_userns, struct inode *dip,  in jfs_create()  argument
74 jfs_info("jfs_create: dip:0x%p name:%pd", dip, dentry); in jfs_create()
76 rc = dquot_initialize(dip); in jfs_create()
92 ip = ialloc(dip, mode); in jfs_create()
98 tid = txBegin(dip->i_sb, 0); in jfs_create()
100 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT); in jfs_create()
103 rc = jfs_init_acl(tid, ip, dip); in jfs_create()
107 rc = jfs_init_security(tid, ip, dip, &dentry->d_name); in jfs_create()
113 if ((rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE))) { in jfs_create()
124 iplist[0] = dip; in jfs_create()
137 if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) { in jfs_create()
152 dip->i_ctime = dip->i_mtime = current_time(dip); in jfs_create()
154 mark_inode_dirty(dip); in jfs_create()
161 mutex_unlock(&JFS_IP(dip)->commit_mutex); in jfs_create()
195 static int jfs_mkdir(struct user_namespace *mnt_userns, struct inode *dip, in jfs_mkdir() argument
207 jfs_info("jfs_mkdir: dip:0x%p name:%pd", dip, dentry); in jfs_mkdir()
209 rc = dquot_initialize(dip); in jfs_mkdir()
225 ip = ialloc(dip, S_IFDIR | mode); in jfs_mkdir()
231 tid = txBegin(dip->i_sb, 0); in jfs_mkdir()
233 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT); in jfs_mkdir()
236 rc = jfs_init_acl(tid, ip, dip); in jfs_mkdir()
240 rc = jfs_init_security(tid, ip, dip, &dentry->d_name); in jfs_mkdir()
246 if ((rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE))) { in jfs_mkdir()
257 iplist[0] = dip; in jfs_mkdir()
263 dtInitRoot(tid, ip, dip->i_ino); in jfs_mkdir()
270 if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) { in jfs_mkdir()
286 inc_nlink(dip); /* for '..' from child directory */ in jfs_mkdir()
287 dip->i_ctime = dip->i_mtime = current_time(dip); in jfs_mkdir()
288 mark_inode_dirty(dip); in jfs_mkdir()
295 mutex_unlock(&JFS_IP(dip)->commit_mutex); in jfs_mkdir()
333 static int jfs_rmdir(struct inode *dip, struct dentry *dentry) in jfs_rmdir() argument
343 jfs_info("jfs_rmdir: dip:0x%p name:%pd", dip, dentry); in jfs_rmdir()
346 rc = dquot_initialize(dip); in jfs_rmdir()
363 tid = txBegin(dip->i_sb, 0); in jfs_rmdir()
365 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT); in jfs_rmdir()
368 iplist[0] = dip; in jfs_rmdir()
379 if ((rc = dtDelete(tid, dip, &dname, &ino, JFS_REMOVE))) { in jfs_rmdir()
385 mutex_unlock(&JFS_IP(dip)->commit_mutex); in jfs_rmdir()
393 dip->i_ctime = dip->i_mtime = current_time(dip); in jfs_rmdir()
394 inode_dec_link_count(dip); in jfs_rmdir()
422 mutex_unlock(&JFS_IP(dip)->commit_mutex); in jfs_rmdir()
428 if (test_cflag(COMMIT_Stale, dip)) { in jfs_rmdir()
429 if (dip->i_size > 1) in jfs_rmdir()
430 jfs_truncate_nolock(dip, 0); in jfs_rmdir()
432 clear_cflag(COMMIT_Stale, dip); in jfs_rmdir()
463 static int jfs_unlink(struct inode *dip, struct dentry *dentry) in jfs_unlink() argument
475 jfs_info("jfs_unlink: dip:0x%p name:%pd", dip, dentry); in jfs_unlink()
478 rc = dquot_initialize(dip); in jfs_unlink()
490 tid = txBegin(dip->i_sb, 0); in jfs_unlink()
492 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT); in jfs_unlink()
495 iplist[0] = dip; in jfs_unlink()
502 if ((rc = dtDelete(tid, dip, &dname, &ino, JFS_REMOVE))) { in jfs_unlink()
508 mutex_unlock(&JFS_IP(dip)->commit_mutex); in jfs_unlink()
515 ip->i_ctime = dip->i_ctime = dip->i_mtime = current_time(ip); in jfs_unlink()
516 mark_inode_dirty(dip); in jfs_unlink()
531 mutex_unlock(&JFS_IP(dip)->commit_mutex); in jfs_unlink()
560 mutex_unlock(&JFS_IP(dip)->commit_mutex); in jfs_unlink()
563 tid = txBegin(dip->i_sb, 0); in jfs_unlink()
584 if (test_cflag(COMMIT_Stale, dip)) { in jfs_unlink()
585 if (dip->i_size > 1) in jfs_unlink()
586 jfs_truncate_nolock(dip, 0); in jfs_unlink()
588 clear_cflag(COMMIT_Stale, dip); in jfs_unlink()
872 static int jfs_symlink(struct user_namespace *mnt_userns, struct inode *dip, in jfs_symlink() argument
891 jfs_info("jfs_symlink: dip:0x%p name:%s", dip, name); in jfs_symlink()
893 rc = dquot_initialize(dip); in jfs_symlink()
911 ip = ialloc(dip, S_IFLNK | 0777); in jfs_symlink()
917 tid = txBegin(dip->i_sb, 0); in jfs_symlink()
919 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT); in jfs_symlink()
922 rc = jfs_init_security(tid, ip, dip, &dentry->d_name); in jfs_symlink()
1011 rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE); in jfs_symlink()
1014 rc = dtInsert(tid, dip, &dname, &ino, &btstack); in jfs_symlink()
1026 dip->i_ctime = dip->i_mtime = current_time(dip); in jfs_symlink()
1027 mark_inode_dirty(dip); in jfs_symlink()
1032 iplist[0] = dip; in jfs_symlink()
1039 mutex_unlock(&JFS_IP(dip)->commit_mutex); in jfs_symlink()
1442 static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, unsigned int flags) in jfs_lookup() argument
1454 rc = dtSearch(dip, &key, &inum, &btstack, JFS_LOOKUP); in jfs_lookup()
1462 ip = jfs_iget(dip->i_sb, inum); in jfs_lookup()