Re: [PATCH 7/8] xfs: factor common write setup code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 04, 2011 at 03:48:37PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> The buffered IO and direct Io write paths share a common set of
> checks and limiting code prior to issuing the write. Factor that
> into a common helper function.

Wouldn't it be better to create the helper before duplicating the code,
aka move it before the buffer/direct splits in the series?

> +	/*
> +	 * If we're writing the file then make sure to clear the setuid and
> +	 * setgid bits if the process is not being run by root.  This keeps
> +	 * people from modifying setuid and setgid binaries.
> +	 */
> +	error = file_remove_suid(file);
> +	return error;

just

	return file_remove_suid(file);
?

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux