mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	switch utimes() to fget_light/fput_light
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
		
							parent
							
								
									0aa2ee5f0a
								
							
						
					
					
						commit
						c217a2a004
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -140,18 +140,19 @@ long do_utimes(int dfd, const char __user *filename, struct timespec *times, | |||
| 		goto out; | ||||
| 
 | ||||
| 	if (filename == NULL && dfd != AT_FDCWD) { | ||||
| 		int fput_needed; | ||||
| 		struct file *file; | ||||
| 
 | ||||
| 		if (flags & AT_SYMLINK_NOFOLLOW) | ||||
| 			goto out; | ||||
| 
 | ||||
| 		file = fget(dfd); | ||||
| 		file = fget_light(dfd, &fput_needed); | ||||
| 		error = -EBADF; | ||||
| 		if (!file) | ||||
| 			goto out; | ||||
| 
 | ||||
| 		error = utimes_common(&file->f_path, times); | ||||
| 		fput(file); | ||||
| 		fput_light(file, fput_needed); | ||||
| 	} else { | ||||
| 		struct path path; | ||||
| 		int lookup_flags = 0; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Al Viro
						Al Viro