lkml.org 
[lkml]   [2008]   [Jun]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [parch 4/4] vfs: utimensat(): fix write access check for futimens()
FromMiklos Szeredi <>
DateWed, 04 Jun 2008 07:54:46 +0200
> At which point the "if (f)" and the "else" branches become equivalent
> (the nameidata isn't interesting in the other case either).  So that
> could be written as:
> 
> 		if (!is_owner_or_cap(inode)) {
> 			error = permission(inode, MAY_WRITE, NULL);
> 			if (error)
> 				goto mnt_drop_write_and_out;
> 		}

And also the IS_IMMUTABLE() check can be removed, since it's checked
by permission(MAY_WRITE) anyway.

Miklos


\
 
 \ /
  Last update: 2008-06-04 07:59    [from the cache]
©2003-2008