Revert^2 "Add permission checks for setattr"

Additional changes:
Support setattr calls with fd

If ftruncate(2) is called with an fd, the FUSE daemon will get a
corresponding setattr call with the file_info object containing the
fd. In those cases, instead of checking if the caller has write access
to the file, we can simply use the fd itself for the corresponding
operation.

Test: atest
DocumentsUIGoogleTests: com.android.documentsui.FileCopyUiTest#testCopyDocuments_{From,To}SdCard
Bug: 159714862
Change-Id: I40e87a406f2c62275ce7c7a270f03dd8956e4923
1 file changed