namei.c (10ce3cc919f50c2043b41ca968b43c26a3672600) namei.c (8de52778798fe39660a8d6b26f290e0c93202761)
1/*
2 * Copyright (C) International Business Machines Corp., 2000-2004
3 * Portions Copyright (C) Christoph Hellwig, 2001-2002
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

--- 206 unchanged lines hidden (view full) ---

215 struct btstack btstack;
216 struct inode *iplist[2];
217 struct tblock *tblk;
218
219 jfs_info("jfs_mkdir: dip:0x%p name:%s", dip, dentry->d_name.name);
220
221 dquot_initialize(dip);
222
1/*
2 * Copyright (C) International Business Machines Corp., 2000-2004
3 * Portions Copyright (C) Christoph Hellwig, 2001-2002
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

--- 206 unchanged lines hidden (view full) ---

215 struct btstack btstack;
216 struct inode *iplist[2];
217 struct tblock *tblk;
218
219 jfs_info("jfs_mkdir: dip:0x%p name:%s", dip, dentry->d_name.name);
220
221 dquot_initialize(dip);
222
223 /* link count overflow on parent directory ? */
224 if (dip->i_nlink == JFS_LINK_MAX) {
225 rc = -EMLINK;
226 goto out1;
227 }
228
229 /*
230 * search parent directory for entry/freespace
231 * (dtSearch() returns parent directory page pinned)
232 */
233 if ((rc = get_UCSname(&dname, dentry)))
234 goto out1;
235
236 /*

--- 564 unchanged lines hidden (view full) ---

801 ino_t ino;
802 struct component_name dname;
803 struct btstack btstack;
804 struct inode *iplist[2];
805
806 jfs_info("jfs_link: %s %s", old_dentry->d_name.name,
807 dentry->d_name.name);
808
223 /*
224 * search parent directory for entry/freespace
225 * (dtSearch() returns parent directory page pinned)
226 */
227 if ((rc = get_UCSname(&dname, dentry)))
228 goto out1;
229
230 /*

--- 564 unchanged lines hidden (view full) ---

795 ino_t ino;
796 struct component_name dname;
797 struct btstack btstack;
798 struct inode *iplist[2];
799
800 jfs_info("jfs_link: %s %s", old_dentry->d_name.name,
801 dentry->d_name.name);
802
809 if (ip->i_nlink == JFS_LINK_MAX)
810 return -EMLINK;
811
812 dquot_initialize(dir);
813
814 tid = txBegin(ip->i_sb, 0);
815
816 mutex_lock_nested(&JFS_IP(dir)->commit_mutex, COMMIT_MUTEX_PARENT);
817 mutex_lock_nested(&JFS_IP(ip)->commit_mutex, COMMIT_MUTEX_CHILD);
818
819 /*

--- 313 unchanged lines hidden (view full) ---

1133 }
1134
1135 if (S_ISDIR(old_ip->i_mode)) {
1136 if (new_ip) {
1137 if (!dtEmpty(new_ip)) {
1138 rc = -ENOTEMPTY;
1139 goto out3;
1140 }
803 dquot_initialize(dir);
804
805 tid = txBegin(ip->i_sb, 0);
806
807 mutex_lock_nested(&JFS_IP(dir)->commit_mutex, COMMIT_MUTEX_PARENT);
808 mutex_lock_nested(&JFS_IP(ip)->commit_mutex, COMMIT_MUTEX_CHILD);
809
810 /*

--- 313 unchanged lines hidden (view full) ---

1124 }
1125
1126 if (S_ISDIR(old_ip->i_mode)) {
1127 if (new_ip) {
1128 if (!dtEmpty(new_ip)) {
1129 rc = -ENOTEMPTY;
1130 goto out3;
1131 }
1141 } else if ((new_dir != old_dir) &&
1142 (new_dir->i_nlink == JFS_LINK_MAX)) {
1143 rc = -EMLINK;
1144 goto out3;
1145 }
1146 } else if (new_ip) {
1147 IWRITE_LOCK(new_ip, RDWRLOCK_NORMAL);
1148 /* Init inode for quota operations. */
1149 dquot_initialize(new_ip);
1150 }
1151
1152 /*

--- 471 unchanged lines hidden ---
1132 }
1133 } else if (new_ip) {
1134 IWRITE_LOCK(new_ip, RDWRLOCK_NORMAL);
1135 /* Init inode for quota operations. */
1136 dquot_initialize(new_ip);
1137 }
1138
1139 /*

--- 471 unchanged lines hidden ---