Author: mjg
Date: Mon May 18 13:43:33 2015
New Revision: 283058
URL: https://svnweb.freebsd.org/changeset/base/283058

Log:
  Tidy up sys_umask a little bit
  
  Consistently use saved fdp pointer as it cannot change. If it could change the
  code would be already incorrect.
  
  No functional changes.

Modified:
  head/sys/kern/vfs_syscalls.c

Modified: head/sys/kern/vfs_syscalls.c
==============================================================================
--- head/sys/kern/vfs_syscalls.c        Mon May 18 11:04:07 2015        
(r283057)
+++ head/sys/kern/vfs_syscalls.c        Mon May 18 13:43:33 2015        
(r283058)
@@ -4158,13 +4158,13 @@ sys_umask(td, uap)
                int newmask;
        } */ *uap;
 {
-       register struct filedesc *fdp;
+       struct filedesc *fdp;
 
-       FILEDESC_XLOCK(td->td_proc->p_fd);
        fdp = td->td_proc->p_fd;
+       FILEDESC_XLOCK(fdp);
        td->td_retval[0] = fdp->fd_cmask;
        fdp->fd_cmask = uap->newmask & ALLPERMS;
-       FILEDESC_XUNLOCK(td->td_proc->p_fd);
+       FILEDESC_XUNLOCK(fdp);
        return (0);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to