Patchwork [BUG:2553,BRANCH:release-3.1] nfs: more fixes to capture sattr for further usage

login
register
Submitter Anand Avati
Date 2011-03-30 06:51:42
Message ID <20110330065142.GA8092@dev.gluster.com>
Download mbox | patch
Permalink /patch/6640/
State Accepted
Headers show

Comments

Anand Avati - 2011-03-30 06:51:42
in

- mkdir
- mknod

Signed-off-by: Anand Avati <avati@gluster.com>
---
 xlators/nfs/server/src/nfs3.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index f60a1e6..6bf4fff 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -2720,7 +2720,7 @@  nfs3_mkdir (rpcsvc_request_t *req, struct nfs3_fh *dirfh, char *name,
         nfs3_handle_call_state_init (nfs3, cs, req, vol, stat, nfs3err);
 
         cs->parent = *dirfh;
-        cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, NULL,
+        cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
                                                           &cs->mode);
         ret = nfs3_fh_resolve_and_resume (cs, dirfh, name, nfs3_mkdir_resume);
         if (ret < 0)
@@ -3149,13 +3149,13 @@  nfs3_mknod (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name,
         case NF3BLK:
                 cs->devnums = nodedata->mknoddata3_u.device.spec;
                 sattr = &nodedata->mknoddata3_u.device.dev_attributes;
-                cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, NULL,
+                cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
                                                                   &cs->mode);
                 break;
         case NF3SOCK:
         case NF3FIFO:
                 sattr = &nodedata->mknoddata3_u.pipe_attributes;
-                cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, NULL,
+                cs->setattr_valid = nfs3_sattr3_to_setattr_valid (sattr, &cs->stbuf,
                                                                   &cs->mode);
                 break;
         default: