OGAWA Hirofumi wrote:
I found the SuSv3 says for ftruncate(): Upon successful completion, if fildes refers to a regular file, ftruncate() shall mark for update the last data modification and last file status change timestamps of the file and the S_ISUID and S_ISGID bits of the file mode may be cleared. If the ftruncate() function is unsuccessful, the file is unaffected. And vmtruncate() can return error easily with RLIMIT_FSIZE or ->s_maxbytes. So, I think clearing s[ug]id first may be bad behavior without good reason.
Hmm, you mean we should clear suid after we do notify_change()? Good point! I will update the patch now... Thanks for your review! -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html