Trond Myklebust 65e4308d25 [PATCH] NFS: Ensure we always update inode->i_mode when doing O_EXCL creates
When the client performs an exclusive create and opens the file for writing,
a Netapp filer will first create the file using the mode 01777. It does this
since an NFSv3/v4 exclusive create cannot immediately set the mode bits.
The 01777 mode then gets put into the inode->i_mode. After the file creation
is successful, we then do a setattr to change the mode to the correct value
(as per the NFS spec).

The problem is that nfs_refresh_inode() no longer updates inode->i_mode, so
the latter retains the 01777 mode. A bit later, the VFS notices this, and calls
remove_suid(). This of course now resets the file mode to inode->i_mode & 0777.
Hey presto, the file mode on the server is now magically changed to 0777. Duh...

Fixes http://bugzilla.linux-nfs.org/show_bug.cgi?id=32

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-16 09:30:58 -07:00
..
2005-06-28 21:20:31 -07:00
2005-07-07 16:50:16 +02:00
2005-06-23 09:45:26 -07:00
2005-07-10 15:45:11 -07:00
2005-06-25 16:24:24 -07:00
2005-07-12 12:08:43 -07:00
2005-06-24 00:06:41 -07:00
2005-07-12 16:01:01 -07:00
2005-07-13 11:25:24 -07:00
2005-06-21 19:07:41 -07:00
2005-07-12 12:08:43 -07:00
2005-07-27 16:26:06 -07:00
2005-06-21 18:46:18 -07:00
2005-07-07 18:23:46 -07:00
2005-07-12 16:01:03 -07:00
2005-07-12 12:08:43 -07:00
2005-07-05 15:03:46 -07:00
2005-07-08 17:38:07 -07:00
2005-08-15 09:50:31 -07:00
2005-06-21 18:46:32 -07:00
2005-06-28 21:20:35 -07:00
2005-06-25 16:24:55 -07:00
2005-06-23 09:45:18 -07:00
2005-08-03 09:12:05 -07:00
2005-06-23 09:45:05 -07:00
2005-07-12 16:00:58 -07:00
2005-06-24 00:06:28 -07:00
2005-06-23 09:45:04 -07:00
2005-06-27 15:11:43 -07:00
2005-07-26 14:35:41 -07:00
2005-06-24 00:06:41 -07:00
2005-07-12 20:38:38 -07:00
2005-06-27 15:11:44 -07:00
2005-08-11 16:05:50 -07:00
2005-06-25 16:24:32 -07:00
2005-07-27 16:26:04 -07:00
2005-06-23 20:49:30 -07:00
2005-06-25 16:24:42 -07:00
2005-06-23 09:45:35 -07:00
2005-07-12 11:52:57 -07:00
2005-07-12 12:08:43 -07:00