• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/jfs/

Lines Matching defs:dip

61  * NAME:	jfs_create(dip, dentry, mode)
63 * FUNCTION: create a regular file in the parent directory <dip>
66 * PARAMETER: dip - parent directory vnode
74 static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
86 jfs_info("jfs_create: dip:0x%p name:%s", dip, dentry->d_name.name);
88 dquot_initialize(dip);
102 ip = ialloc(dip, mode);
108 tid = txBegin(dip->i_sb, 0);
110 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT);
113 rc = jfs_init_acl(tid, ip, dip);
117 rc = jfs_init_security(tid, ip, dip);
123 if ((rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE))) {
134 iplist[0] = dip;
147 if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) {
162 dip->i_ctime = dip->i_mtime = CURRENT_TIME;
164 mark_inode_dirty(dip);
171 mutex_unlock(&JFS_IP(dip)->commit_mutex);
193 * NAME: jfs_mkdir(dip, dentry, mode)
195 * FUNCTION: create a child directory in the parent directory <dip>
198 * PARAMETER: dip - parent directory vnode
207 static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
218 jfs_info("jfs_mkdir: dip:0x%p name:%s", dip, dentry->d_name.name);
220 dquot_initialize(dip);
223 if (dip->i_nlink == JFS_LINK_MAX) {
240 ip = ialloc(dip, S_IFDIR | mode);
246 tid = txBegin(dip->i_sb, 0);
248 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT);
251 rc = jfs_init_acl(tid, ip, dip);
255 rc = jfs_init_security(tid, ip, dip);
261 if ((rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE))) {
272 iplist[0] = dip;
278 dtInitRoot(tid, ip, dip->i_ino);
285 if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) {
301 inc_nlink(dip); /* for '..' from child directory */
302 dip->i_ctime = dip->i_mtime = CURRENT_TIME;
303 mark_inode_dirty(dip);
310 mutex_unlock(&JFS_IP(dip)->commit_mutex);
332 * NAME: jfs_rmdir(dip, dentry)
336 * PARAMETER: dip - parent inode
350 static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
360 jfs_info("jfs_rmdir: dip:0x%p name:%s", dip, dentry->d_name.name);
363 dquot_initialize(dip);
376 tid = txBegin(dip->i_sb, 0);
378 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT);
381 iplist[0] = dip;
392 if ((rc = dtDelete(tid, dip, &dname, &ino, JFS_REMOVE))) {
398 mutex_unlock(&JFS_IP(dip)->commit_mutex);
406 dip->i_ctime = dip->i_mtime = CURRENT_TIME;
407 inode_dec_link_count(dip);
435 mutex_unlock(&JFS_IP(dip)->commit_mutex);
441 if (test_cflag(COMMIT_Stale, dip)) {
442 if (dip->i_size > 1)
443 jfs_truncate_nolock(dip, 0);
445 clear_cflag(COMMIT_Stale, dip);
457 * NAME: jfs_unlink(dip, dentry)
462 * PARAMETER: dip - inode of parent directory
476 static int jfs_unlink(struct inode *dip, struct dentry *dentry)
488 jfs_info("jfs_unlink: dip:0x%p name:%s", dip, dentry->d_name.name);
491 dquot_initialize(dip);
499 tid = txBegin(dip->i_sb, 0);
501 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT);
504 iplist[0] = dip;
511 if ((rc = dtDelete(tid, dip, &dname, &ino, JFS_REMOVE))) {
517 mutex_unlock(&JFS_IP(dip)->commit_mutex);
524 ip->i_ctime = dip->i_ctime = dip->i_mtime = CURRENT_TIME;
525 mark_inode_dirty(dip);
540 mutex_unlock(&JFS_IP(dip)->commit_mutex);
569 mutex_unlock(&JFS_IP(dip)->commit_mutex);
572 tid = txBegin(dip->i_sb, 0);
593 if (test_cflag(COMMIT_Stale, dip)) {
594 if (dip->i_size > 1)
595 jfs_truncate_nolock(dip, 0);
597 clear_cflag(COMMIT_Stale, dip);
868 * NAME: jfs_symlink(dip, dentry, name)
871 * in directory <dip>
873 * PARAMETER: dip - parent directory vnode
885 static int jfs_symlink(struct inode *dip, struct dentry *dentry,
905 jfs_info("jfs_symlink: dip:0x%p name:%s", dip, name);
907 dquot_initialize(dip);
923 ip = ialloc(dip, S_IFLNK | 0777);
929 tid = txBegin(dip->i_sb, 0);
931 mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT);
934 rc = jfs_init_security(tid, ip, dip);
1023 rc = dtSearch(dip, &dname, &ino, &btstack, JFS_CREATE);
1026 rc = dtInsert(tid, dip, &dname, &ino, &btstack);
1038 dip->i_ctime = dip->i_mtime = CURRENT_TIME;
1039 mark_inode_dirty(dip);
1044 iplist[0] = dip;
1051 mutex_unlock(&JFS_IP(dip)->commit_mutex);
1455 static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struct nameidata *nd)
1467 if (JFS_SBI(dip->i_sb)->mntflag & JFS_OS2)
1471 inum = dip->i_ino;
1473 inum = PARENT(dip);
1477 rc = dtSearch(dip, &key, &inum, &btstack, JFS_LOOKUP);
1488 ip = jfs_iget(dip->i_sb, inum);
1496 if (dentry && (JFS_SBI(dip->i_sb)->mntflag & JFS_OS2))