aboutsummaryrefslogtreecommitdiffstats
path: root/init
Commit message (Expand)AuthorAge
* [PATCH] Kconfig: move CONFIG_EMBEDDED options to submenuChuck Ebbert2006-09-16
* [PATCH] per-task-delay-accounting: delay accounting usage of taskstats interfaceShailabh Nagar2006-07-15
* [PATCH] per-task-delay-accounting: taskstats interfaceShailabh Nagar2006-07-15
* [PATCH] per-task-delay-accounting: setupShailabh Nagar2006-07-15
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds2006-07-04
|\
| * kbuild: introduce utsrelease.hSam Ravnborg2006-07-03
* | [PATCH] lockdep: annotate genirqIngo Molnar2006-07-03
* | [PATCH] lockdep: coreIngo Molnar2006-07-03
* | [PATCH] lockdep: better lock debuggingIngo Molnar2006-07-03
* | [PATCH] lockdep: console_init after local_irq_enable()Heiko Carstens2006-07-03
* | [PATCH] time initialisation fixjohn stultz2006-07-03
|/
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2006-06-30
|\
| * Remove obsolete #include <linux/config.h>Jörn Engel2006-06-30
* | [PATCH] UML: fix the INIT_ENV_ARG_LIMIT dependenciesAdrian Bunk2006-06-30
* | [PATCH] add smp_setup_processor_id()Andrew Morton2006-06-30
* | [PATCH] Light weight event countersChristoph Lameter2006-06-30
|/
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6Linus Torvalds2006-06-29
|\
| * [PATCH] devfs: Remove the devfs_fs_kernel.h file from the treeGreg Kroah-Hartman2006-06-26
| * [PATCH] devfs: Remove devfs from the init codeGreg Kroah-Hartman2006-06-26
* | [PATCH] pi-futex: rt mutex coreIngo Molnar2006-06-27
* | [PATCH] fs/buffer.c: cleanupsAdrian Bunk2006-06-27
|/
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds2006-06-26
|\
| * kconfig: add defconfig_list/module optionRoman Zippel2006-06-09
* | Merge branch 'x86-64'Linus Torvalds2006-06-26
|\ \
| * | [PATCH] x86_64: Move VM86 config into arch/i386/KconfigAndi Kleen2006-06-26
| * | [PATCH] x86_64: reliable stack trace supportJan Beulich2006-06-26
* | | [PATCH] initramfs overwrite fixH. Peter Anvin2006-06-26
* | | [PATCH] Time: Use clocksource infrastructure for update_wall_timejohn stultz2006-06-26
|/ /
* | [PATCH] Make sysctl obligatory except under CONFIG_EMBEDDEDH. Peter Anvin2006-06-25
* | Merge branch 'audit.b21' of git://git.kernel.org/pub/scm/linux/kernel/git/vir...Linus Torvalds2006-06-20
|\ \
| * | [PATCH] audit: path-based rulesAmy Griffis2006-06-20
| |/
* | [MTD] Allow alternate JFFS2 mount variant for root filesystem.Joern Engel2006-05-30
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6David Woodhouse2006-05-15
|\|
| * [PATCH] root mount failure: emit filesystems attemptedAndy Whitcroft2006-05-15
| * [PATCH] initramfs: fix CPIO hardlink checkMark Huang2006-05-15
* | Finally remove the obnoxious inter_module_xxx()David Woodhouse2006-05-08
|/
* [PATCH] silence initcall warningsAndrew Morton2006-05-01
* [PATCH] i386: Move CONFIG_DOUBLEFAULT into arch/i386 where it belongs.Andi Kleen2006-04-18
* [PATCH] menu: relocate DOUBLEFAULT optionRandy Dunlap2006-04-11
* [PATCH] for_each_possible_cpu: fixes for generic partKAMEZAWA Hiroyuki2006-03-28
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2006-03-26
|\
| * do_mounts.c: Minor ROOT_DEV comment cleanupFlorin Malita2006-03-26
* | [PATCH] Fix typo causing bad mode of /initrd.imageJason Gunthorpe2006-03-26
* | [PATCH] remove fixup_cpu_present_map()Andrew Morton2006-03-26
|/
* Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds2006-03-25
|\
| * Kconfig: remove the CONFIG_CC_ALIGN_* optionsAdrian Bunk2006-03-12
* | [PATCH] BLK_DEV_INITRD: do not require BLK_DEV_RAM=yZdenek Pavlas2006-03-25
* | [PATCH] add a proper prototype for setup_arch()Adrian Bunk2006-03-25
* | [PATCH] initcall failure reportingAndrew Morton2006-03-25
* | [PATCH] Remove MODULE_PARMRusty Russell2006-03-25
="hl opt">, inodes, &num_inodes); xfs_bmap_init(&free_list, &first_block); tp = xfs_trans_alloc(mp, XFS_TRANS_RENAME); cancel_flags = XFS_TRANS_RELEASE_LOG_RES; spaceres = XFS_RENAME_SPACE_RES(mp, target_name->len); error = xfs_trans_reserve(tp, spaceres, XFS_RENAME_LOG_RES(mp), 0, XFS_TRANS_PERM_LOG_RES, XFS_RENAME_LOG_COUNT); if (error == ENOSPC) { spaceres = 0; error = xfs_trans_reserve(tp, 0, XFS_RENAME_LOG_RES(mp), 0, XFS_TRANS_PERM_LOG_RES, XFS_RENAME_LOG_COUNT); } if (error) { xfs_trans_cancel(tp, 0); goto std_return; } /* * Attach the dquots to the inodes */ error = xfs_qm_vop_rename_dqattach(inodes); if (error) { xfs_trans_cancel(tp, cancel_flags); goto std_return; } /* * Lock all the participating inodes. Depending upon whether * the target_name exists in the target directory, and * whether the target directory is the same as the source * directory, we can lock from 2 to 4 inodes. */ xfs_lock_inodes(inodes, num_inodes, XFS_ILOCK_EXCL); /* * Join all the inodes to the transaction. From this point on, * we can rely on either trans_commit or trans_cancel to unlock * them. */ xfs_trans_ijoin(tp, src_dp, XFS_ILOCK_EXCL); if (new_parent) xfs_trans_ijoin(tp, target_dp, XFS_ILOCK_EXCL); xfs_trans_ijoin(tp, src_ip, XFS_ILOCK_EXCL); if (target_ip) xfs_trans_ijoin(tp, target_ip, XFS_ILOCK_EXCL); /* * If we are using project inheritance, we only allow renames * into our tree when the project IDs are the same; else the * tree quota mechanism would be circumvented. */ if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) && (xfs_get_projid(target_dp) != xfs_get_projid(src_ip)))) { error = XFS_ERROR(EXDEV); goto error_return; } /* * Set up the target. */ if (target_ip == NULL) { /* * If there's no space reservation, check the entry will * fit before actually inserting it. */ error = xfs_dir_canenter(tp, target_dp, target_name, spaceres); if (error) goto error_return; /* * If target does not exist and the rename crosses * directories, adjust the target directory link count * to account for the ".." reference from the new entry. */ error = xfs_dir_createname(tp, target_dp, target_name, src_ip->i_ino, &first_block, &free_list, spaceres); if (error == ENOSPC) goto error_return; if (error) goto abort_return; xfs_trans_ichgtime(tp, target_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); if (new_parent && src_is_directory) { error = xfs_bumplink(tp, target_dp); if (error) goto abort_return; } } else { /* target_ip != NULL */ /* * If target exists and it's a directory, check that both * target and source are directories and that target can be * destroyed, or that neither is a directory. */ if (S_ISDIR(target_ip->i_d.di_mode)) { /* * Make sure target dir is empty. */ if (!(xfs_dir_isempty(target_ip)) || (target_ip->i_d.di_nlink > 2)) { error = XFS_ERROR(EEXIST); goto error_return; } } /* * Link the source inode under the target name. * If the source inode is a directory and we are moving * it across directories, its ".." entry will be * inconsistent until we replace that down below. * * In case there is already an entry with the same * name at the destination directory, remove it first. */ error = xfs_dir_replace(tp, target_dp, target_name, src_ip->i_ino, &first_block, &free_list, spaceres); if (error) goto abort_return; xfs_trans_ichgtime(tp, target_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); /* * Decrement the link count on the target since the target * dir no longer points to it. */ error = xfs_droplink(tp, target_ip); if (error) goto abort_return; if (src_is_directory) { /* * Drop the link from the old "." entry. */ error = xfs_droplink(tp, target_ip); if (error) goto abort_return; } } /* target_ip != NULL */ /* * Remove the source. */ if (new_parent && src_is_directory) { /* * Rewrite the ".." entry to point to the new * directory. */ error = xfs_dir_replace(tp, src_ip, &xfs_name_dotdot, target_dp->i_ino, &first_block, &free_list, spaceres); ASSERT(error != EEXIST); if (error) goto abort_return; } /* * We always want to hit the ctime on the source inode. * * This isn't strictly required by the standards since the source * inode isn't really being changed, but old unix file systems did * it and some incremental backup programs won't work without it. */ xfs_trans_ichgtime(tp, src_ip, XFS_ICHGTIME_CHG); xfs_trans_log_inode(tp, src_ip, XFS_ILOG_CORE); /* * Adjust the link count on src_dp. This is necessary when * renaming a directory, either within one parent when * the target existed, or across two parent directories. */ if (src_is_directory && (new_parent || target_ip != NULL)) { /* * Decrement link count on src_directory since the * entry that's moved no longer points to it. */ error = xfs_droplink(tp, src_dp); if (error) goto abort_return; } error = xfs_dir_removename(tp, src_dp, src_name, src_ip->i_ino, &first_block, &free_list, spaceres); if (error) goto abort_return; xfs_trans_ichgtime(tp, src_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); xfs_trans_log_inode(tp, src_dp, XFS_ILOG_CORE); if (new_parent) xfs_trans_log_inode(tp, target_dp, XFS_ILOG_CORE); /* * If this is a synchronous mount, make sure that the * rename transaction goes to disk before returning to * the user. */ if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) { xfs_trans_set_sync(tp); } error = xfs_bmap_finish(&tp, &free_list, &committed); if (error) { xfs_bmap_cancel(&free_list); xfs_trans_cancel(tp, (XFS_TRANS_RELEASE_LOG_RES | XFS_TRANS_ABORT)); goto std_return; } /* * trans_commit will unlock src_ip, target_ip & decrement * the vnode references. */ return xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); abort_return: cancel_flags |= XFS_TRANS_ABORT; error_return: xfs_bmap_cancel(&free_list); xfs_trans_cancel(tp, cancel_flags); std_return: return error; }