]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
on non-posix shares, clear write bits in mode when ATTR_READONLY is set
authorJeff Layton <jlayton@redhat.com>
Thu, 22 May 2008 13:31:40 +0000 (09:31 -0400)
committerSteve French <sfrench@us.ibm.com>
Fri, 23 May 2008 18:17:09 +0000 (18:17 +0000)
commit4468eb3fd102cad559e51594a01cbc65b994d264
tree247fe6ab216b047e3f48aee07e845b17d2447ed7
parentaaa9bbe039febf1d3a0f3a374deea0680d9f5758
on non-posix shares, clear write bits in mode when ATTR_READONLY is set

When mounting a share with posix extensions disabled,
cifs_get_inode_info turns off all the write bits in the mode for regular
files if ATTR_READONLY is set. Directories and other inode types,
however, can also have ATTR_READONLY set, but the mode gives no
indication of this.

This patch makes this apply to other inode types besides regular files.
It also cleans up how modes are set in cifs_get_inode_info for both the
"normal" and "dynperm" cases.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/inode.c
fs/cifs/readdir.c