于 2012年10月10日 12:06, Eric W. Biederman 写道: > Gao feng <gaofeng@xxxxxxxxxxxxxx> writes: > >> If the map is already set,we should return -EINVAL. > > What makes -EINVAL a better return code? > It shouldn't be -EPERM,this will cause user confused. The first time to write to the uid_map file is success, and the second time,kernel will return -EPERM.actually the user has right to write to the uid_map. And if you think -EPERM is better,it's not necessary to initialize the value of ret.because we set it to -EPERM after we get mutex lock id_map_mutex. _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/containers