diff mbox

[V9fs-developer] fs/9p: mkdir fix for setting S_ISGID bit as per parent directory

Message ID 1282111312-15741-1-git-send-email-harsh@linux.vnet.ibm.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Harsh Prateek Bora Aug. 18, 2010, 6:01 a.m. UTC
None
diff mbox

Patch

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index abeb4f0..571204b 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -887,6 +887,8 @@  static int v9fs_vfs_mkdir_dotl(struct inode *dir, struct dentry *dentry,
 	v9ses = v9fs_inode2v9ses(dir);
 
 	mode |= S_IFDIR;
+	if (dir->i_mode & S_ISGID)
+		mode |= S_ISGID;
 	dir_dentry = v9fs_dentry_from_dir_inode(dir);
 	dfid = v9fs_fid_lookup(dir_dentry);
 	if (IS_ERR(dfid)) {