Well, out_truncate is a sucessfull exit, too.
Maybe the patch was missing a few lines of context to make the situation
completly clear:
out_unlock:
spin_unlock(&mapping->i_shared_lock);
truncate_inode_pages(mapping, offset);
goto out_truncate;
do_expand:
if (offset > inode->i_sb->s_maxbytes)
goto out;
limit = current->rlim[RLIMIT_FSIZE].rlim_cur;
if (limit != RLIM_INFINITY) {
if (inode->i_size >= limit) {
send_sig(SIGXFSZ, current, 0);
goto out;
}
if (offset > limit) {
send_sig(SIGXFSZ, current, 0);
offset = limit;
}
}
inode->i_size = offset;
- if (inode->i_op && inode->i_op->truncate)
- {
- /* This doesnt scale but it is meant to be a 2.4 invariant */
- lock_kernel();
- inode->i_op->truncate(inode);
- unlock_kernel();
- }
- return 0;
-
+
out_truncate:
if (inode->i_op && inode->i_op->truncate) {
+ /* This doesnt scale but it is meant to be a 2.4 invariant */
lock_kernel();
inode->i_op->truncate(inode);
unlock_kernel();
}
return 0;
out:
return -EFBIG;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/