From: adilger Date: Wed, 25 Feb 2004 23:37:32 +0000 (+0000) Subject: Don't always fix up the permissions on the ROOT inode. X-Git-Tag: v1_7_100~1^71~14 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c9a303bc6fdd490f327dd92163d3a19b976983dd;p=fs%2Flustre-release.git Don't always fix up the permissions on the ROOT inode. b=2661 --- diff --git a/lustre/lvfs/lvfs_linux.c b/lustre/lvfs/lvfs_linux.c index 7e34fce..7f381d3 100644 --- a/lustre/lvfs/lvfs_linux.c +++ b/lustre/lvfs/lvfs_linux.c @@ -179,7 +179,7 @@ void pop_ctxt(struct obd_run_ctxt *saved, struct obd_run_ctxt *new_ctx, EXPORT_SYMBOL(pop_ctxt); /* utility to make a file */ -struct dentry *simple_mknod(struct dentry *dir, char *name, int mode) +struct dentry *simple_mknod(struct dentry *dir, char *name, int mode, int fix) { struct dentry *dchild; int err = 0; @@ -198,7 +198,7 @@ struct dentry *simple_mknod(struct dentry *dir, char *name, int mode) GOTO(out_err, err = -EEXIST); /* Fixup file permissions if necessary */ - if ((old_mode & S_IALLUGO) != (mode & S_IALLUGO)) { + if (fix && (old_mode & S_IALLUGO) != (mode & S_IALLUGO)) { CWARN("fixing permissions on %s from %o to %o\n", name, old_mode, mode); dchild->d_inode->i_mode = (mode & S_IALLUGO) | @@ -224,7 +224,7 @@ out_up: EXPORT_SYMBOL(simple_mknod); /* utility to make a directory */ -struct dentry *simple_mkdir(struct dentry *dir, char *name, int mode) +struct dentry *simple_mkdir(struct dentry *dir, char *name, int mode, int fix) { struct dentry *dchild; int err = 0; @@ -242,7 +242,7 @@ struct dentry *simple_mkdir(struct dentry *dir, char *name, int mode) GOTO(out_err, err = -ENOTDIR); /* Fixup directory permissions if necessary */ - if ((old_mode & S_IALLUGO) != (mode & S_IALLUGO)) { + if (fix && (old_mode & S_IALLUGO) != (mode & S_IALLUGO)) { CWARN("fixing permissions on %s from %o to %o\n", name, old_mode, mode); dchild->d_inode->i_mode = (mode & S_IALLUGO) |