Whamcloud - gitweb
Branch: HEAD
[fs/lustre-release.git] / lustre / obdfilter / filter_io.c
index 643a427..3d505ec 100644 (file)
@@ -506,6 +506,8 @@ static int filter_preprw_write(int cmd, struct obd_export *exp, struct obdo *oa,
         struct fsfilt_objinfo fso;
         struct obd_device *obd;
         obd_size left;
+        obd_uid uid;
+        obd_gid gid;
         void *iobuf; 
         
         ENTRY;
@@ -522,6 +524,9 @@ static int filter_preprw_write(int cmd, struct obd_export *exp, struct obdo *oa,
         obd = exp->exp_obd;
         push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
 
+        uid = oa->o_valid & OBD_MD_FLUID ? oa->o_uid : 0;
+        gid = oa->o_valid & OBD_MD_FLGID ? oa->o_gid : 0;
+        
         /* make sure that object is already allocated */
         dentry = filter_crow_object(obd, oa);
         if (IS_ERR(dentry))