if (IS_ERR(lower_file)) {
err = PTR_ERR(lower_file);
goto out;
- } else
+ } else {
unionfs_set_lower_file_idx(file, bindex, lower_file);
+ }
}
out:
return err;
break;
}
return err;
- } else
+ } else {
lower_flags &= ~(OPEN_WRITE_FLAGS);
+ }
}
dget(lower_dentry);
* always be valid, but its lower inode times don't have to
* be, so sync up the times only.
*/
- if (IS_ROOT(dtmp))
+ if (IS_ROOT(dtmp)) {
unionfs_copy_attr_times(dtmp->d_inode);
- else {
+ } else {
/*
* reset generation number to zero, guaranteed to be
* "old"
if (unlikely(is_newer_lower(dentry))) {
/* root dentry special case as aforementioned */
- if (IS_ROOT(dentry))
+ if (IS_ROOT(dentry)) {
unionfs_copy_attr_times(dentry->d_inode);
- else {
+ } else {
/*
* reset generation number to zero, guaranteed to be
* "old"
first_lower_mnt =
unionfs_mntget(parent_dentry, bindex);
first_dentry_offset = bindex;
- } else
+ } else {
dput(lower_dentry);
+ }
continue;
}
break;
case INTERPOSE_LOOKUP:
spliced = d_splice_alias(inode, dentry);
- if (IS_ERR(spliced))
+ if (IS_ERR(spliced)) {
err = PTR_ERR(spliced);
- else if (spliced && spliced != dentry) {
+ } else if (spliced && spliced != dentry) {
/*
* d_splice can return a dentry if it was
* disconnected and had to be moved. We must ensure
new->bindex = bindex;
new->whiteout = whiteout;
- if (namelen < DNAME_INLINE_LEN_MIN)
+ if (namelen < DNAME_INLINE_LEN_MIN) {
new->name = new->iname;
- else {
+ } else {
new->name = kmalloc(namelen + 1, GFP_KERNEL);
if (unlikely(!new->name)) {
kmem_cache_free(unionfs_filldir_cachep, new);
}
err = do_unionfs_rename(old_dir, old_dentry, new_dir, new_dentry);
out:
- if (err)
+ if (err) {
/* clear the new_dentry stuff created */
d_drop(new_dentry);
- else {
+ } else {
/*
* force re-lookup since the dir on ro branch is not renamed,
* and lower dentries still indicate the un-renamed ones.