887953
From 9e95bd4e3b2e64880a3522520b05d23cf29b3d91 Mon Sep 17 00:00:00 2001
887953
From: Amar Tumballi <amarts@redhat.com>
887953
Date: Mon, 10 Sep 2018 09:28:28 +0530
887953
Subject: [PATCH 372/385] Revert "posix: disable block and character files"
887953
887953
This reverts commit d542543faf4eca04737ddfe215e8988a700caf42.
887953
887953
BUG: 1622649
887953
Change-Id: Ib51b798df25ff606e6bdef72aba679a1d97f98d1
887953
Signed-off-by: Amar Tumballi <amarts@redhat.com>
887953
Reviewed-on: https://code.engineering.redhat.com/gerrit/149666
887953
Tested-by: RHGS Build Bot <nigelb@redhat.com>
887953
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
887953
---
887953
 xlators/storage/posix/src/posix.c | 17 -----------------
887953
 1 file changed, 17 deletions(-)
887953
887953
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
887953
index 5088469..e0165f8 100644
887953
--- a/xlators/storage/posix/src/posix.c
887953
+++ b/xlators/storage/posix/src/posix.c
887953
@@ -1453,23 +1453,6 @@ posix_mknod (call_frame_t *frame, xlator_t *this,
887953
         }
887953
 
887953
 
887953
-        if (((mode & S_IFMT) == S_IFBLK) || ((mode & S_IFMT) == S_IFCHR)) {
887953
-                /* Man page 'man 2 mknod':
887953
-                    EPERM  mode  requested  creation  of something other than
887953
-                    a regular file, FIFO (named pipe), or UNIX domain socket,
887953
-                    and the caller is not privileged (Linux: does not have the
887953
-                    CAP_MKNOD capability); also returned  if  the  filesystem
887953
-                    containing pathname does not support the type of node
887953
-                    requested.
887953
-                */
887953
-                op_ret = -1;
887953
-                op_errno = EPERM;
887953
-                gf_msg (this->name, GF_LOG_ERROR, op_errno, P_MSG_MKNOD_FAILED,
887953
-                        "%s: mknod failed as Block and Character devices "
887953
-                        "are not supported on GlusterFS", real_path);
887953
-                goto out;
887953
-        }
887953
-
887953
         op_ret = posix_pstat (this, loc->pargfid, par_path, &preparent);
887953
         if (op_ret == -1) {
887953
                 op_errno = errno;
887953
-- 
887953
1.8.3.1
887953